标签:
Description
Input
Output
Sample Input
Sample Output
1 #include<cstdio> 2 int main() 3 { 4 int c,n,m; 5 scanf("%d",&c); 6 while(c--) 7 { 8 scanf("%d%d",&n,&m); 9 if(m>=n) 10 { 11 printf("Grass\n"); 12 } 13 else 14 { 15 int ans; 16 ans=n%(m+1); 17 if(ans==0) 18 { 19 printf("Rabbit\n"); 20 } 21 else if(ans<m+1) 22 { 23 printf("Grass\n"); 24 } 25 } 26 } 27 return 0; 28 }
标签:
原文地址:http://www.cnblogs.com/forwin/p/4890327.html