Modulo rulez
Source: BWM 2004, 1st round, problem 1
September 3, 2004
Problem Statement
At the beginning of a game, I write the numbers , , ..., onto a desk. A move consists of
- selecting some numbers standing on the desk;
- calculating the rest of the sum of these numbers under division by and writing this rest onto the desk;
- deleting the selected numbers.
In such a game, after a number of moves, only two numbers remained on the desk. One of them was . What was the other one?