Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78170 刘泽熙 15反转数字 C++ Accepted 1 MS 268 KB 232 2024-06-16 15:32:00

Tests(10/10):


Code:

#include<iostream> using namespace std; int main() { int n; cin >> n; if (n < 0){ cout << '-'; n = 0 - n; } while (n % 10 == 0){ n /= 10; } while (n!=0){ cout << n % 10; n /= 10; } }