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 s;
|
|
getline(cin, s);
|
|
// 这个布尔变量有点意思
|
|
bool passZero = true;
|
|
for (int i = s.length() - 1; i >= 0; i--) {
|
|
if (s[i] == '0' && passZero) {
|
|
continue;
|
|
}
|
|
passZero = false;
|
|
cout << s[i];
|
|
}
|
|
return 0;
|
|
}
|