PROJECT EULER · #0860
Gold and Silver Coin Game
Gary and Sally play a game using gold and silver coins arranged into a number of vertical stacks, alternating turns. On Gary's turn he chooses a gold coin and removes it from the game along with any other coins sitting on top. Sally does the same on her turn by removing a silver coin. The first player unable to make a move loses.
An arrangement is called fair if the person moving first, whether it be Gary or Sally, will lose the game if both play optimally.
Define
You are also given
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.