xurunsong @ 2020-12-15 18:32:38
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long N;
char b;
cin>>N;
if(N==0)
{
cout<<N;
return 0;
}
if(N<0)
{
N=N-(2*N);
cout<<"-";
if(N%10==0)
N/=10;
while(N>0)
{
cout<<N%10;
N/=10;
}
}
else
{
if(N%10==0)
N/=10;
while(N>0)
{
cout<<N%10;
N/=10;
}
}
return 0;
}
by devans @ 2020-12-15 18:41:38
试试 10200
这个数据?
你的程序输出了 0201
by devans @ 2020-12-15 18:44:23
错误原因是程序只对
by xurunsong @ 2020-12-15 22:34:48
@Out_Bounds 谢谢