Problem 7.3. (15 points) Several boxes are stored in a warehouse. It is known that there are no more than 60 boxes, and each of them contains either 59 apples or 60 oranges. After a box with a certain number of oranges was brought to the warehouse, the number of fruits in the warehouse became equal. What is the smallest number of oranges that could have been in the brought box?
Answer: 30.

Solution. Let the number of boxes with oranges be denoted by $n$, the number of boxes with apples by $m$, and the number of oranges in the brought box by $x$. According to the problem, $59 m = 60 n + x$. By moving $59 n$ to the left side, we get $59(m - n) = n + x$. From this, it follows that $n + x$ is a natural number divisible by 59, so it is at least 59. Also, since both sides of the equation are positive, we have $m > n$.

If $x \leq 29$, then $n \geq 30$ and $m \geq 31$, which contradicts the condition $n + m \leq 60$. Therefore, $x \geq 30$.

It remains to note that for $m = 30$, $n = 29$, and $x = 30$, the condition of the problem is satisfied, meaning there could be exactly 30 oranges in the brought box.

Alternative solution. Consider the situation with the smallest possible number of oranges in the box. Note that there must be more boxes with apples than boxes with oranges (otherwise, there would already be fewer apples than oranges in the boxes, and the brought box with oranges would not be able to equalize the number of fruits). Let the number of boxes with oranges be denoted by $n$; then $n \leq 29$, otherwise the total number of boxes would exceed 60.

We will prove that the number of boxes with apples is exactly one more than the number of boxes with oranges. Indeed, in any other case, there are at least $n + 2$ boxes with apples. This means that the number of apples in the boxes is at least

$$
59(n + 2) - 60 n = 118 - n
$$

Since $n \leq 29$, this difference is at least 89. But then one box with apples can be removed, and the number of oranges in the brought box can be reduced by 59. This means that the considered case does not give the minimum number of oranges in the box, a contradiction.

Then the difference between the number of apples and the number of oranges in the boxes is

$$
59(n + 1) - 60 n = 59 - n
$$

This difference decreases as $n$ increases, so the smallest value of the difference is achieved at the largest value of $n$. Therefore, this difference (equal to the number of oranges in the box) reaches its smallest value, 30, at the largest value of $n = 29$ (the total number of boxes is then exactly 59).

## Criteria

The highest applicable criterion is used:

15 points. Any complete solution to the problem.

12 points. The estimate is proven that there are at least 30 oranges in the box.

Alternatively (if the above criteria are not applicable or give fewer points), the following advancements are summed:

+8 points. It is proven that to achieve the minimum difference between the number of apples and the number of oranges, the number of boxes with apples must be exactly one more.

In the absence of a proof of this fact, the following criterion is used:

+6 points. This fact is stated without proof.

+7 points. All cases for $n < 30$ are considered, where there are $n + 1$ boxes with apples and $n$ boxes with oranges. (For example, it may be noted that when $n$ increases by 1, the difference $59(n + 1) - 60 n = 59 - n$ decreases by 1.)

In the absence of a complete consideration of these cases, the following criterion is used:

+3 points. An example is given where there are exactly 30 oranges in the box (or it is otherwise proven that such a situation is possible).

The following advancement is not scored:

0 points. The correct answer is given.