You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#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;
|
|
} |