HDU 2149 (巴什博奕) Public Sale
没什么好说的,一道水题。
1 #include <cstdio> 2 3 int main() 4 { 5 int n, m; 6 while(scanf("%d%d", &n, &m) == 2) 7 { 8 if(n <= m) 9 { 10 for(int i = n; i < m; i++) printf("%d ", i); 11 printf("%d\n", m); 12 continue; 13 } 14 int a = n % (m + 1); 15 if(a) printf("%d\n", a); 16 else puts("none"); 17 } 18 19 return 0; 20 }