drunkpiano 2017/6/24 19:51:12
1~3: win
4: lose
5 : win
6 : win
7 : win
8 : lose
9 : win
10: win
11: win
12: lose
找一下规律,会发现答案是:
public boolean canWinNim(int n) {
return n%4 != 0;
}
drunkpiano 2017/6/24 19:51:12
1~3: win
4: lose
5 : win
6 : win
7 : win
8 : lose
9 : win
10: win
11: win
12: lose
找一下规律,会发现答案是:
public boolean canWinNim(int n) {
return n%4 != 0;
}