题解 | #取近似值#
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
#include <iostream>
using namespace std;
int main() {
double a;
cin >> a;
int b = a;
double c = b;
double d = a - c;
if(d >= 0.5)
cout << c + 1 << endl;
else cout << c << endl;
return 0;
}
// 64 位输出请用 printf("%lld")

