Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
66610 | 夏梓瑞 | 18统计成绩 | C++ | Accepted | 1 MS | 268 KB | 397 | 2024-03-09 15:39:43 |
# include<iostream> using namespace std; int main(){ int z[101],n,a=0,max=0,zx=10001; double ty; cin>>n; for(int i=1;i<=n;i++){ cin>>z[i]; a+=z[i]; }cout<<a<<' '; for(int i=1;i<=n;i++){ if(max<z[i]){ max=z[i];} if(zx>z[i]) zx=z[i];} ty=a*1.0/n; printf("%.2lf",ty); cout<<' '<<max<<' '<<zx<<' '; return 0; }