Modified NIM game

121 Views Asked by At

There are two rock piles. The first pile contains N rocks, and the second one contains M rocks, where
($0  ≤  N, M  ≤  10^{9}$) . First and second players take turns to play the game, In each turn, a player can choose to take one rock from a single pile, or take one rock from both piles. The player who cannot make any move, loses the game.

So I don't know how to modify the xor equation to work with this case?

1

There are 1 best solutions below

2
On BEST ANSWER

Hint: Losing positions are $(N,M)$ such that $N$ and $M$ are both even.