提交时间:2024-01-30 19:45:44

运行 ID: 39154

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