Shapovalov A.V.

There are three piles of 40 stones each. Petya and Vasya take turns, Petya starts. On a turn, one must combine two piles, then divide these stones into four piles. The player who cannot make a move loses. Which of the players (Petya or Vasya) can win, regardless of how the opponent plays?
For a move, two piles are replaced by four, i.e., the number of piles increases by 2. So, how many piles will there be when the game ends? At the beginning, the number of piles was odd, so, increasing by two, it will always remain odd.

If the next move cannot be made, then in the two largest piles, there are no more than 3 stones in total. Then in all the other piles, there is 1 stone each, and there are at least 120 - 3 = 117 such piles. That is, there should be (at least) 119 piles in total. To get 119 piles, (119 - 3) $: 2$ = 58 moves need to be made. This number is even, which means the last move was made by Vasya (and he won).

## Answer

Vasya.

Comment. In fact, this is a joke game: Vasya wins regardless of the players' actions.

Submit a comment