Sylar @ 2016-07-22 21:56:03
#include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
string s;
int i,k,lens;
cin>>s;
reverse(s.begin()+1,s.end());
if (s[0]='-')
{
i=1;
cout<<s[0];
}
else {i=0;}
while(s[i]=='0')
{
i++;
}
k=i;
for(i=k;i<=s.length();i++)
{
cout<<s[i];
}
return 0;
}
by Sylar @ 2016-07-23 20:54:27
还是不行