Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113082 | 陈骏睿 | 18统计成绩 | C++ | Accepted | 1 MS | 276 KB | 597 | 2025-03-15 11:41:27 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double n,a[1000],x=0,w=0,m=100; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n;i++){ x+=a[i]; } for(int i=0;i<n;i++){ if(a[i]>w){ w=a[i]; }if(a[i]<m){ m=a[i]; } } cout<<x<<" "; printf("%.2lf ",x/n); cout<<w<<" "<<m; return 0; }