[ Game Theory_(other) ]

[ Evenness and Oddness ]

In one pile there are 18 candies, and in another - 23. Two people are playing a game: in one move, you can eat one pile of candies and divide the other into two piles. The loser is the one who cannot make a move, that is, the one who, before their move, has two piles of one candy. Who will win with correct play?
You need to force your opponent to always divide a pile with an odd number of candies.

## Solution

The first player should eat the pile of 23 candies on the first move and divide the pile of 18 candies into two piles with an odd number of candies. After this, the second player will eat one of the piles and divide the other pile into two piles, one with an even number of candies and the other with an odd number. Now, the first player is in a situation similar to the initial one, where there are two piles, one with an even number of candies and the other with an odd number. The first player should again eat the "odd" pile and divide the "even" pile into two odd piles, and so on. No matter how the second player moves, after their move, there will be two piles left, one of which has an even (and therefore greater than 1) number of candies. Therefore, after the second player's move, the first player can make their move.

## Answer

The first.