60分求助
查看原帖
60分求助
737406
shensteve楼主2022/7/25 15:22

错误在第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;
}
2022/7/25 15:22
加载中...