题目:

原题链接: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

相关文章:

  • 2021-07-25
  • 2021-09-11
  • 2022-12-23
  • 2021-06-25
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-20
  • 2021-10-03
  • 2021-07-28
  • 2021-08-18
  • 2022-02-15
  • 2021-10-25
相关资源
相似解决方案