#31163: 感謝leslie100791的建議(c++ AC)


jason096727@gmail.com (Jason Ho)


#include <bits/stdc++.h>

using namespace std;

int main()
{
    string n;
    while (cin >> n){
        int b=1;
        for (int i=n.length()-1; i>=0; i--){
            if (atoi(n.c_str())==0){
                cout << 0 << endl;
                break;
            }
            else if (n[i]=='0'&&b==1){
                continue;
            }
            else if (n[i]!=0){
                b=0;
            }
            cout << n[i];
        }
    }

    return 0;
}

#31189: Re: 感謝leslie100791的建議(c++ AC)


leslie100791 (魚在地上爬)


哈哈不會啦~  一起加油~