HDU 2147 kiki's game
来源:互联网 发布:激活码淘号软件 编辑:程序博客网 时间:2024/05/16 13:03
kiki's game
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 40000/10000 K (Java/Others)Total Submission(s): 8869 Accepted Submission(s): 5285
Problem Description
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?
Input
Input contains multiple test cases. Each line contains two integer n, m (0<n,m<=2000). The input is terminated when n=0 and m=0.
Output
If kiki wins the game printf "Wonderful!", else "What a pity!".
Sample Input
5 35 46 60 0
Sample Output
What a pity!Wonderful!Wonderful!
Author
月野兔
Source
HDU 2007-11 Programming Contest
Recommend
威士忌
#include <stdio.h>int main(){ int n,m; while(scanf("%d%d",&n,&m)>0&&m&&n) { if(n%2==0||m%2==0) printf("Wonderful!\n"); else printf("What a pity!\n"); } return 0;}
0 0
- hdu 2147 kiki's game
- HDU-2147:kiki's game
- hdu 2147 kiki's game
- HDU 2147 - kiki's game
- hdu 2147 kiki's game
- HDU 2147 kiki's game
- HDU 2147kiki's game
- hdu 2147 kiki's game
- HDU 2147 kiki's game
- HDU 2147 kiki's game
- hdu 2147 kiki's game
- HDU 2147 kiki's game
- HDU 2147 kiki's game
- HDU 2147 kiki's game
- hdu 2147 kiki's game
- 【HDU 2147 kiki's game】
- 【hdu 2147】kiki's game
- hdu 2147 kiki's game
- SQL Server 创建链接服务器
- 使用baksmali和smali反编译和编译apk
- [LeetCode] Odd Even Linked List
- hdu4251The Famous ICPC Team Again【划分树入门题】
- Android------Intent用法大全
- HDU 2147 kiki's game
- 实际项目中关于java常量宏替换的实际问题
- MSSQL和MYSQL数据交互
- Swift 基本知识点之七类与结构体
- XStream转换xml
- 98. Validate Binary Search Tree
- Golang Channel用法简编
- 使用mp4v2将H264+AAC合成mp4文件
- springmvc利用ResponseBody注解返回HTTP406问题