8. (5 points) Anya and Kolya were collecting apples. It turned out that Anya collected as many apples as the percentage of the total number of apples collected by Kolya, and Kolya collected an odd number of apples. How many apples did Anya and Kolya collect together?
Answer: $25,300,525,1900,9900$.

## Solution:

All additional variables that will be introduced during the solution are natural numbers.

Let the number of apples collected by Kolya be $k$, the number of apples collected by Anya be $a$, and the total number of collected apples be $n$. Anya collected as many apples as the percentage of the total number of apples collected by Kolya, so $a = \frac{k}{n} \cdot 100$, from which we get $100k = an$.

Let $a$ be an even number. Then substituting $n = a + k$ into the obtained equation, we get $100k = a(a + k)$. Let $d = \operatorname{GCD}(a, k)$, then $k = dx$ and $a = dy$, where $x$ and $y$ are coprime. We get the equation $100dx = dy(dx + dy)$, which simplifies to $100x = dy(x + y)$ after canceling $d$. Since $x, y$, and $x + y$ are coprime, and $dy(x + y)$ is divisible by $x$, we conclude that $d$ is divisible by $x$.

Furthermore, from the oddness of $k$ and the evenness of $a$ (and, consequently, $y$), it follows that the numbers $d, x$, and $x + y$ are odd. Since $dy(x + y)$ is divisible by 4, $y$ is divisible by 4, i.e., $y = 4z$.

We get $100x = 4dz(x + 4z)$, from which $25x = dz(x + 4z)$. Since $\frac{25}{z(x + 4z)} = \frac{d}{x}$ is an integer, we conclude that 25 is divisible by $z(x + 4z)$. Since $x + 4z > z$.

1) $z = 1, x + 4z = 5$. Then $x = 1, d = \frac{25x}{z(x + 4z)} = 5$. Therefore, $k = dx = 5, a = dy = 4dz = 20$, from which $n = 25$.
2) $z = 1, x + 4z = 25$. Then $x = 21, d = \frac{25x}{z(x + 4z)} = 21$. Therefore, $k = dx = 21^2 = 441, a = dy = 4dz = 84$, from which $n = 525$.

Now let $a$ be an odd number (and $n$, accordingly, even). Then substituting $a = n - k$ into the obtained equation, we get $100k = n(n - k)$. Let $d = \operatorname{GCD}(n, k)$, then $k = dx$ and $n = dy$, where $x$ and $y$ are coprime. We get the equation $100dx = dy(dy - dx)$, which simplifies to $100x = dy(y - x)$ after canceling $d$. Since $x, y$, and $y - x$ are coprime, and $dy(y - x)$ is divisible by $x$, we conclude that $d$ is divisible by $x$.

Furthermore, from the oddness of $k$ and $a$, it follows that the numbers $d, x$, and $y - x$ are also odd. Since $dy(y - x)$ is divisible by 4, $y$ is divisible by 4, i.e., $y = 4z$.

We get $100x = 4dz(4z - x)$, from which $25x = dz(4z - x)$. Since $\frac{25}{z(4z - x)} = \frac{d}{x}$ is an integer, we conclude that 25 is divisible by $z(4z - x)$. Thus, the numbers $z$ and $4z - x$ give a product of 1, 5, or 25 and are coprime. Therefore, one of them is 1, and the other is a divisor of 25.

1) $z = 1, 4z - x = 1$. Then $x = 3, d = \frac{25x}{z(4z - x)} = 75$. Therefore, $k = dx = 225, n = dy = 4dz = 300$.
2) $z = 1, 4z - x = 5$ or $4z - x = 25$ - these cases are impossible because $4z - x > 4z = 4$.
3) $z = 5, 4z - x = 1$. Then $x = 19, d = \frac{25x}{z(4z - x)} = 95$. Therefore, $k = dx = 19 \cdot 95 = 1805, n = dy = 4dz = 1900$.
4) $z = 25, 4z - x = 1$. Then $x = 99, d = \frac{25x}{z(4z - x)} = 99$. Therefore, $k = dx = 99^2 = 9801, n = dy = 4dz = 9900$.

## 8th grade, 2nd variant