错误在第2,3,4,8个测试点。
#include <bits/stdc++.h> using namespace std; int main() float x; cin>>x; if(x<0){ x=ceil(x); } if(x>0){ x=floor(x); } cout<<x; return 0; }