PROJECT EULER · #0325
Stone Game II
A game is played with two piles of stones and two players.
On each player's turn, the player may remove a number of stones from the larger pile.
The number of stones removed must be a positive multiple of the number of stones in the smaller pile.
E.g. Let the ordered pair
The player taking all the stones from a pile wins the game.
A winning configuration is one where the first player can force a win. For example,
A losing configuration is one where the second player can force a win, no matter what the first player does. For example,
Define
We can verify that
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.