c++
class Solution {
public:
bool canWinNim(int n) {
return n % 4 > 0;
}
};
python
class Solution(object):
def canWinNim(self, n):
"""
:type n: int
:rtype: bool
"""
return n%4 > 0
class Solution {
public:
bool canWinNim(int n) {
return n % 4 > 0;
}
};
class Solution(object):
def canWinNim(self, n):
"""
:type n: int
:rtype: bool
"""
return n%4 > 0