博客结束:
https://www.cnblogs.com/aiguona/p/8351046.html
hdu 2149


/*只有当m小于n时才有可能多出价,否则就不可能给对手留下(n + 1)的局面了。*/ /*输入m卖价和n加价,输出第一次可叫的价格*/ #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int main() {int m, n;while(~scanf("%d %d", &m, &n))//m为底价 n为可加价的范围 {if(m % (n + 1) == 0) //不可能赢的局面 puts("none");else{int i;if(m <= n)for(i = m; i <= n; i++) //直接第一次加价到m就能赢 {printf("%d", i);if(i != n) putchar(' ');else putchar('\n');}elseprintf("%d\n", m % (n + 1)); }}return 0; }
SG函数:
https://www.cnblogs.com/aiguona/p/9126324.html