HDU1846 Brave Game

 1 /*
 2 HDU1846 Brave Game
  http://acm.hdu.edu.cn/showproblem.php?pid=1846
3 博弈论 巴什博奕 4 * 5 * 6 * 7 * 8 */ 9 #include <cstdio> 10 int main() 11 { 12 int t; 13 scanf("%d",&t); 14 int n,m; 15 while(t--) 16 { 17 scanf("%d%d",&n,&m); 18 if(n%(m+1)==0) 19 printf("second\n"); 20 else 21 printf("first\n"); 22 } 23 return 0; 24 }

 

posted @ 2017-03-16 08:13  BBBob  阅读(95)  评论(0编辑  收藏  举报