(博弈)Simple Game --codeforces--570B

时间:2025-01-04 13:06:14

链接:

http://codeforces.com/problemset/problem/570/B

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87813#problem/I

代码:

#include<stdio.h>
#include<string.h> #define N 1100 int main()
{
int n, m;
while(scanf("%d%d", &n, &m)!=EOF)
{
if(n==) ///只有1,他只能输了
{
printf("1\n");
continue;
}
if(m>n/)
printf("%d\n", m-);
else
printf("%d\n", m+);
}
return ;
}