HDU--4764

题目:

Stone

原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=4764

 1 #include<iostream>
 2 #include<cstdio>
 3 #include<cstring>
 4 #include<cmath>
 5 #include<algorithm>
 6 using namespace std;
 7 int main()
 8 {
 9     int n,k;
10     while(scanf("%d%d",&n,&k)==2)
11     {
12         if(n==0&&k==0)break;
13         if((n-1)%(k+1)==0)printf("Jiang\n");
14         else printf("Tang\n");
15     }
16     return 0;
17 }
View Code

 

posted @ 2013-09-28 22:10  EtheGreat  阅读(132)  评论(0编辑  收藏  举报