Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
5253 孙文谦 倒序输出一个四位整数 C++ Accepted 100 0 MS 252 KB 264 2020-07-28 17:28:44

Tests(9/9):


#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e; cin>>a; b=a/1000; c=(a-b*1000)/100; d=(a-b*1000-c*100)/10; e=a-b*1000-c*100-d*10; if(e!=0) cout<<e*1000+d*100+c*10+b; else cout<<0<<d*100+c*10+b; return 0; }


Judgement Protocol: