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

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; } }