Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37683 | 奚晨瑞 | 求三位数各数位中最大值 | C++ | Accepted | 1 MS | 244 KB | 300 | 2024-01-22 17:27:28 |
#include<iostream> using namespace std; int main() { int x; cin>>x; int a,b,c,e; a=x/100; b=(x-a*100)/10; c=(x-a*100-b*10)/1; e=0; if(a>e){ e=a; } if(b>e){ e=b; } if(c>e){ e=c; } cout<<a<<" "<<b<<" "<<c<<endl<<e; return 0; }