代码如下:
while(c.back()=='0'&&c.size()>1) c.pop_back(); reverse(c.begin(),c.end()); for(auto i:c) cout<<i;