如果石头的数目是4的整数,则先取者会输;否则,先取者会赢。
public class Solution {
public boolean canWinNim(int n) {
if(n % 4 != 0) return true;
else
return false;
}
}