HDU2149 Public Sale
1 /* 2 HDU2149 Public Sale 3 http://acm.hdu.edu.cn/showproblem.php?pid=2149 4 博弈论 巴什博奕 5 * 6 * 7 * 8 */ 9 10 11 #include <cstdio> 12 int main() 13 { 14 int m,n; 15 while(scanf("%d%d",&n,&m)==2) 16 { 17 if(n<=m) 18 { 19 printf("%d",n); 20 for(int i=n+1;i<=m;i++) 21 printf(" %d",i); 22 printf("\n"); 23 continue; 24 } 25 int r=n%(m+1); 26 if(r==0) 27 printf("none\n"); 28 else 29 printf("%d\n",r); 30 } 31 return 0; 32 }