HDU 2149.Public Sale-巴什博奕

HDU2149:

 

代码:

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

 

posted @ 2018-02-12 21:44  ZERO-  阅读(109)  评论(0编辑  收藏  举报