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.

27 lines
462 B

#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
int n;
scanf("%d", &n);
if (n == 0) {
puts("0");
exit(0);
}
if (n < 0) {
printf("-");
n = -n;
}
while (n) {
v.push_back(n % 10);
n = n / 10;
}
int i;
for (i = 0; i < v.size(); i++)
if (v[i]) break;
for (; i < v.size(); i++) printf("%d", v[i]);
return 0;
}