Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6670 | 张昊然 | 【基础题】绝对值 | C++ | Accepted | 2 MS | 808 KB | 206 | 2021-02-18 09:39:55 |
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { double n; cin >> n; if (n < 0) { n -= n * 2; } double fabs(n); printf("%.2lf", n); return 0; }