Haha, an interesting problem. Just try to let your opponent start with a number that is an integer multiple of 4.
1 class Solution { 2 public: 3 bool canWinNim(int n) { 4 return n % 4; 5 } 6 };
Haha, an interesting problem. Just try to let your opponent start with a number that is an integer multiple of 4.
1 class Solution { 2 public: 3 bool canWinNim(int n) { 4 return n % 4; 5 } 6 };