题解 | #四舍五入#
四舍五入
https://ac.nowcoder.com/acm/problem/22006
#include <bits/stdc++.h> using namespace std;
int main() { int n; cin>>n; if(n%10>=5) { cout<<(n/10+1)10<<endl; } else { cout<<n/1010<<endl; } return 0; }
四舍五入
https://ac.nowcoder.com/acm/problem/22006
#include <bits/stdc++.h> using namespace std;
int main() { int n; cin>>n; if(n%10>=5) { cout<<(n/10+1)10<<endl; } else { cout<<n/1010<<endl; } return 0; }
相关推荐