Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
20655 石利伟 调整三位数,使其值最大 C++ Accepted 100 0 MS 252 KB 235 2021-06-19 16:54:56

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int b[10000],n=0; int main(){ int a; cin>>a; b[0]=a%10; while(a){ n++; a/=10; b[n]=a%10; } sort(b+0,b+n); for(int i=n-1;i>=0;i--){ cout<<b[i]; } return 0; }


Judgement Protocol: