Not Nim

Limits 1s, 512 MB

Alice and Bob recently learned about Nim. In a Nim game, two players play a game on several stacks of stones. Players alternatively take turns. In a player’s turn, he can choose a non-empty stack and remove some stones from that stack. When a player has no stack to choose from, he or she loses. Now Nim is a classical game and has been studied extensively. So, Alice and Bob tried to change the rules. In their version of the game, after choosing a stack with xxx stones, if a player removes yyy stones then there should be no number zzz such that x−y≤z<xx-y \leq z < xx−y≤z<x and zzz divides xxx. Note that since 0 dividing any nonzero number does not make sense, players cannot choose y=xy=xy=x. Happy with the new rules, they start to play. In all games, Alice goes first.

This is a companion discussion topic for the original entry at