Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
38743 LeeHao 数字反转 C++ 通过 1 MS 252 KB 323 2024-01-28 13:56:05

Tests(10/10):


#include <bits/stdc++.h> using namespace std; int main() { int n, m = 1, n2 = 0; while (cin >> n) { m = 1; n2 = 0; if (n < 0) { m *= -1; n *= -1; } while (n) { n2 = n2 * 10 + n % 10; n /= 10; } cout << m *n2 << endl; if (cin.get() == '\n') break; } return 0; }


测评信息: