2 条题解
- 1
信息
- ID
- 30043
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- 递交数
- 57
- 已通过
- 29
- 上传者
#include <bits/stdc++.h>
using namespace std;
int main()
{
int x, y;
cin >> x;
if (x > 0)
y = x + 1;
else if (x == 0)
y = 0;
else
y = x - 1;
cout << y << endl;
return 0;
}