5. On 900 cards, all natural numbers from 1 to 900 are written. Cards with squares of integers are removed, and the remaining cards are renumbered, starting from 1.

Then the operation of removing squares is repeated. How many times will this operation have to be repeated to remove all the cards
Answer: 59.

Solution: During the first operation, 30 cards will be removed, leaving $900-30=30 \cdot 29$ cards. Since $30 \cdot 29 > 29^2$, all squares except $30^2$ remain. During the second operation, 29 cards will be removed. There will be $30 \cdot 29 - 29 = 29^2$ cards left. Thus, in two operations, we transition from the number $30^2$ to the number $29^2$. Let's write this in a general form: during the first operation, $n$ cards will be removed, leaving $n^2 - n = n(n-1) > (n-1)^2$ cards. During the second operation, $n-1$ cards will be removed. There will be $n^2 - n - (n-1) = (n-1)^2$ cards left, meaning that in two operations, we always transition from the number $n^2$ to the number $(n-1)^2$. In total, there are 30 squares among the numbers from 1 to 900, and 29 transitions between them. To reach a single card, it will take $2 \cdot 29$ operations, and one more to remove the last card with the number 1.

Comment: Correct solution - 20 points. There is a gap in the justification - 15 points. Errors in the calculation of the number of options with a correct idea - 5 points are deducted. The solution is started, with some progress - 5 points. The solution is started, but there is no noticeable progress - 1 point. The correct answer is given without explanation - 0 points.

## Variant 4