Question 1
In a game of Nim, there are three piles with $7$, $7$, and $5$ stones. On your turn, you may remove any positive number of stones from a single pile (the player taking the last stone wins). How many stones must you remove from the pile of $5$ to reach a winning Nim-sum ($0$) position?
Xem đáp án và lời giải
Đáp án: $5$
Tính tổng XOR hai đống đầu: $7 \oplus 7 = 0$. Cần giảm đống $5$ xuống còn $0$, tức là bốc đi $5 - 0 = 5$ viên.