Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
20786 | LeoWang | 浮点数向零舍入 | C++ | Accepted | 0 MS | 244 KB | 162 | 2023-06-20 08:41:27 |
#include<bits/stdc++.h> using namespace std; int main() { float n; cin>>n; if(n>0){ cout<<(int)n; } if(n<0){ cout<<(int)n+1; } return 0; }