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.

29 lines
456 B

#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int a[N], al;
int main() {
int n;
scanf("%d", &n);
if (n == 0) {
puts("0");
exit(0);
}
if (n < 0) {
printf("-");
n = -n;
}
while (n) {
a[++al] = n % 10;
n = n / 10;
}
int s = 1;
while (a[s] == 0) s++;
for (int i = s; i <= al; i++) printf("%d", a[i]);
return 0;
}