神么玩意,求解

P1307 [NOIP2011 普及组] 数字反转

1350577690a @ 2018-03-02 18:48:13

// 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; }


|