C++
class Solution {
public:
bool canWinNim(int n) {
if(n%4==0)
return false;
else
return true;
}
};
最优解
简化bool
class Solution {
public:
bool canWinNim(int n) {
if(n%4==0)
return false;
else
return true;
}
};
简化bool