#30270: c++解法


milk_wu (milk(訂閱訂起來))


#include <iostream>

#include <string> 

#include <sstream>

using namespace std;

 

int main()

{

string x;

while (cin >> x)

{

string y;

for (int i = x.length()-1; i >= 0; i--)

{

y = y + x[i];

}

while (y[0] == '0' && y.length()>1)

{

y.erase(0, 1);

}

cout << y << endl;

}

}