HDU 2147 kiki's game 博弈
一道很简单的博弈题,找出P状态和N状态的规律即可
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
/*
* Author:lonelycatcher
* Problem:HDU 2147
* Type:组合博弈
*/
#include <iostream>
#include<stdio.h>
#include<cstdlib>
using namespace std;
int n,m;
int main()
{
while(scanf("%d %d",&n,&m))
{
if(n==0&&m==0)break;
if(!(n&1))
{
printf("Wonderful!\n");continue;
}
if(!(m&1))
{
printf("Wonderful!\n");continue;
}
printf("What a pity!\n");
}
return 0;
}
posted on 2011-08-19 21:48 lonelycatcher 阅读(198) 评论(0) 编辑 收藏 举报