Problem 1908 · Medium

Game of Nim

XOR every heap size together: a nonzero total means the first player can force a win.

Open the interactive visualisation