提交时间:2024-11-15 19:25:42

运行 ID: 56759

#include<bits/stdc++.h> using namespace std; int main(){ int mark,students,a,max,min; cin>>students; a=students; cin>>a; max=0; min=10000; while(students>=2){ cin>>mark; if(mark>=max){ max=mark; } else if(mark<=min){ min=mark; } students--; } cout<<max; return 0; }