Files
python/TangDou/CSP-J/AcWingTraining/T3/445.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

14 lines
306 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
string num;
cin >> num;
if (num[0] == '-') cout << '-', num = num.substr(1);
reverse(num.begin(), num.end());
while (num.size() > 1 && num[0] == '0') num = num.substr(1);
cout << num << endl;
return 0;
}