Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2315 | 孙浚轩 | 18统计成绩 | C++ | Accepted | 0 MS | 268 KB | 350 | 2023-12-23 17:58:20 |
#include<iostream> #include<cstdio> using namespace std; int main(){ int n; double s=0,mx=-1,mn=101; cin>>n; double sc[n]; for(int i=0;i<n;i++){ cin>>sc[i]; s+=sc[i]; if(sc[i]>mx) mx=sc[i]; if(sc[i]<mn) mn=sc[i]; } printf("%.lf %.2lf %.lf %.lf",s,s/n,mx,mn); return 0; }