本题没啥难度。不用细说。

#include <cmath>
using namespace std;

int main() {
    float n;
    int res = 0;
    cin >> n;
    float rem = 0.0;
    rem = n - floor(n);
    if (rem >= 0.5) {
        res = ceil(n);
    } else {
        res = floor(n);
    }
    cout << res;

    return 0;
}