#include <iostream>
using namespace std;
int main(int argc, char** argv) {
int x;
while (cin >> x){int y=x; int z=x;if (x==0){cout << 0;}
while (x>0){
if (y%10!=0||z%10!=0){cout << x%10;
}
y/=10;
x/=10;
}
cout << endl;
}
return 0;
}
#include
using namespace std;
int main(int argc, char** argv) {
int x;
while (cin >> x){int y=x; int z=x;if (x==0){cout << 0;}
while (x>0){
if (y%10!=0||z%10!=0){cout << x%10;
}
y/=10;
x/=10;
}
cout << endl;
}
return 0;
}
你可以試著再看一次題目