Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
3904 A班-过懿萱 闯关大冒险? C++ 通过 100 1 MS 268 KB 490 2025-01-04 11:02:02

Tests(5/5):


#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int qian,bai,shi,ge; qian = n / 1000; bai = n / 100 % 10; shi = n / 10 % 10; ge = n % 10; if(qian > bai && qian > shi && qian > ge) { cout<<qian<<endl; } else if(bai > qian && bai > shi && bai > ge) { cout<<bai<<endl; } else if(shi > qian && shi > bai && shi > ge) { cout<<shi<<endl; } else if(ge > qian && ge > bai && ge > shi) { cout<<ge<<endl; } return 0; }


测评信息: