Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107027 | 何睿函 | 18统计成绩 | C++ | Accepted | 1 MS | 272 KB | 355 | 2025-01-17 11:03:08 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[101],x=0,m=100,n,b=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; b=b+a[i]; if(x<a[i]){ x=a[i]; } if(m>a[i]){ m=a[i]; } } printf("%d %.2lf %d %d",b,b*1.0/n,x,m); return 0; }