P310
projecteuler.net

Nim Square

ℹ️Published on Saturday, 13th November 2010, 07:00 pm; Solved by 1308;
Difficulty rating: 40%

Alice and Bob play the game Nim Square.
Nim Square is just like ordinary three-heap normal play Nim, but the players may only remove a square number of stones from a heap.
The number of stones in the three heaps is represented by the ordered triple $(a,b,c)$.
If $0 \le a \le b \le c \le 29$ then the number of losing positions for the next player is $1160$.

Find the number of losing positions for the next player if $0 \le a \le b \le c \le 100\,000$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.