hdu2174 kiki's game 博弈

Recently kiki has nothing to do. While she is bored, an idea appears in his mind, she just playes the checkerboard game.The size of the chesserboard is n*m.First of all, a coin is placed in the top right corner(1,m). Each time one people can move the coin into the left, the underneath or the left-underneath blank space.The person who can't make a move will lose the game. kiki plays it with ZZ.The game always starts with kiki. If both play perfectly, who will win the game?

博弈

 #include<stdio.h>

 int main(){
int n,m;
while(scanf("%d%d",&n,&m)!=EOF&&n+m){
if((n-)%||(m-)%)printf("Wonderful!\n");
else printf("What a pity!\n");
}
return ;
}
上一篇:Android相机、相册获取图片显示并保存到SD卡


下一篇:Nginx限制某个IP同一时间段的访问次数