hdu4764 Stone 博弈
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=4764
很水的博弈题目
代码:
1 #pragma comment(linker, "/STACK:1024000000,1024000000") 2 #include <cstdlib> 3 #include<cstdio> 4 using namespace std; 5 6 int n,k; 7 int main() 8 { 9 while(scanf("%d%d",&n,&k) == 2) 10 { 11 if(n == 0 && k == 0)break; 12 if((n-1)%(k+1) == 0)printf("Jiang\n"); 13 else printf("Tang\n"); 14 } 15 return 0; 16 }