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 "); 20 else 21 printf("first "); 22 } 23 return 0; 24 }
原文地址:https://www.cnblogs.com/BBBob/p/6557690.html