【链接】 我是链接,点我呀:)
【题意】
在这里输入题意
【题解】
模拟
【代码】
/*
1.Shoud it use long long ?
2.Have you ever test several sample(at least therr) yourself?
3.Can you promise that the solution is right? At least,the main ideal
4.use the puts("") or putchar() or printf and such things?
5.init the used array or any value?
6.use error MAX_VALUE?
7.use scanf instead of cin/cout?
8.whatch out the detail input require
*/
#include <bits/stdc++.h>
using namespace std;
int n;
int main(){
#ifdef LOCAL_DEFINE
freopen("rush_in.txt", "r", stdin);
#endif
ios::sync_with_stdio(0),cin.tie(0);
cin >> n;
int x = n%10;
if (x < 5){
n = n-x;
}else{
n = n-x + 10;
}
cout << n << endl;
return 0;
}
本文介绍了一个简单的数字修约算法,该算法将一个整数n进行修约,使其个位数变为最接近的0或5。如果个位数小于5,则修约为最接近的0;如果个位数大于等于5,则修约为最接近的5。通过这种方式,可以快速地对数字进行修约处理。
1328

被折叠的 条评论
为什么被折叠?



