| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 20668 | 鱼锁嵘 | 调整三位数,使其值最大 | C++ | Accepted | 100 | 0 MS | 244 KB | 393 | 2021-06-19 17:19:58 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,x,y,z,t,q; cin>>a; x=a%10; y=(a/10)%10; z=(a/100)%10; t=x; if(t<y)t=y; if(t<z)t=z; cout<<t; if(t==y){ if(x>z){ cout<<x<<z; }else cout<<z<<x; } if(t==z){ if(x>y) cout<<x<<y; else cout<<y<<x; } if(t==x){ if(y>z){ cout<<y<<z; }else cout<<z<<y; } return 0; }