Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5947 | 高振轩 | 求绝对值II | C++ | Wrong Answer | 0 MS | 260 KB | 199 | 2024-12-21 14:46:24 |
#include<bits/stdc++.h> using namespace std; void s(int x){ if(x<0){ cout<<-x; } else if(x==0){ cout<<'0'; } if(x>0){ cout<<x; } } int main(){ int a,b; cin>>a; s(a); }
------Input------
5.2
------Answer-----
5.2
------Your output-----
5