shensteve @ 2022-07-25 15:22:27
错误在第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;
}
by jyc123456 @ 2022-07-25 15:30:48
#include<bits/stdc++.h>
using namespace std;
int main(){
double x;
cin>>x;
if(x<0){
x=ceil(x);
}
if(x>0){
x=floor(x);
}
cout<<(long long)x;
return 0;
}
by jyc123456 @ 2022-07-25 15:32:06
by jyc123456 @ 2022-07-25 15:32:34
@shensteve
by shensteve @ 2022-07-25 15:35:35
@jyc123456 谢谢