14 lines
306 B
C++
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;
|
|
} |