Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
43360 Hyma 求三位数各数位中最大值 C++ 解答错误 0 MS 252 KB 277 2024-03-11 22:28:34

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,n,max=0;; cin>>a>>b>>c>>n; a=n/100; b=n/10%10; c=n%10; if(a>b){ max=a; } else { max=b; } if(c>max){ max=c; } cout<<a<<" "<<b<<" "<<c<<endl; cout<<max; return 0; }


测评信息:

输入

123

输出

0 0 0
0

答案

1 2 3
3

系统信息

exit code: 0, checker exit code: 0