Race to N — Solution & Editorial
Multiples of 4 are losing positions — whatever you add, the opponent can restore a multiple of 4.
Complexity: O(1)
Multiples of 4 are losing positions — whatever you add, the opponent can restore a multiple of 4.
Complexity: O(1)