Task 1. A grid table is given with a width of 300 and a height of 50 cells. A plastic snail is placed in the bottom-left corner, facing upwards along the table, and begins to move one cell in the direction it is facing. If the next cell does not exist, meaning the snail is at the edge of the board, or if the next cell has already been visited, the snail is turned to the right and continues moving in a straight line in the direction it is facing. (This means the snail moves in a spiral, clockwise.)

The snail stops when all cells have been visited. Indicate the row number and column number of the cell where it stops. Columns are numbered from left to right with numbers from 1 to 300, and rows are numbered from bottom to top with numbers from 1 to 50.

![](https://cdn.mathpix.com/cropped/2024_05_06_ff2f30c60f3adcb59d9dg-1.jpg?height=187&width=261&top_left_y=722&top_left_x=596)
Solution. Answer: 25th row, 26th column.

We will denote a cell $(x, y)$ if it is in row $x$ and column $y$.

Initially, the snail is in cell $(1,1)$. After several moves, it will completely walk around the edge and end up in cell $(2,2)$. Notice that at this moment, the configuration of the problem repeats: the snail is in the bottom-left cell and its next move will be upwards, but the rectangle has a width of 298 and a height of 48. After a few more moves, the snail will end up in cell $(3,3)$, and the configuration will repeat again for a rectangle of $296 \times 46$, then it will eventually be in cell $(4,4)$, and so on.

When the snail reaches cell $(25,25)$, it will be in the bottom-left corner of a rectangle that is 252 cells wide and 2 cells high. It is clear that the snail will then walk around the perimeter of this rectangle and stop in cell $(25,26)$.

## Criteria

## Only the largest suitable criterion is used:

7 p. Any complete solution to the problem.

3 p. The idea that after each completed cycle, the snail ends up in cell $(n, n)$, where $n=1,2,3 \ldots 25$ is present.

## 1 6. The correct answer is given.