1350577690a @ 2018-03-02 18:51:43
// luogu-judger-enable-o2
#include<iostream>
using namespace std;
int main()
{
int a;
cin>>a;
if(a<0) {cout<<"-"; a=-a;}
while(a)
{
if(a%10==0)
a/=10;
else
{
cout<<a%10;
a/=10;
}
}
return 0;
}
求解
by AThousandSuns @ 2018-03-02 18:59:46
如果是200你这个就挂了,应该是while(a%10==0),不是if
by Victory_Defeat @ 2018-03-02 19:02:33
为什么我看到了这个
by AThousandSuns @ 2018-03-02 19:16:01
@名侦探柯北2号 拿鼠标选中代码你就知道了(kkk && ltt:哪来这么多bug)
by Victory_Defeat @ 2018-03-03 08:17:26
@nantf 我知道啊,无聊而已