'commit'
This commit is contained in:
26
TangDou/XiTi/1063_2.cpp
Normal file
26
TangDou/XiTi/1063_2.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user