Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113219 | 李朋秦 | 18统计成绩 | C++ | Accepted | 1 MS | 280 KB | 620 | 2025-03-15 14:27:08 |
#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 b=0,a,c[100],e,f=0,g=0,h=100; cin>>a; for(int i=0;i<a;i++){ cin>>c[i]; f=f+c[i]; } cout<<f<<" "; printf("%.2lf",f/a); cout<<" "; for(int j=0;j<a;j++){ if(c[j]>g){ g=c[j]; }if(c[j]<h){ h=c[j]; } } cout<<g<<" "; cout<<h; return 0; }