PROJECT EULER · #0899
DistribuNim I
Two players play a game with two piles of stones. The players alternately take stones from one or both piles, subject to:
- the total number of stones taken is equal to the size of the smallest pile before the move;
- the move cannot take all the stones from a pile.
The player that is unable to move loses.
For example, if the piles are of sizes 3 and 5 then there are three possible moves.
Let
You are given
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.