Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
112149 | 李朋秦 | 计算平均数 | C++ | Accepted | 1 MS | 208 KB | 296 | 2025-03-08 15:10:49 |
#include<cstdio> int main(){ double b=0,a[10000]; double d; for(int i=0;i<5;i++){ scanf("%lf",&a[i]); } for(int j=0;j<5;j++){ b+=a[j]; } d=b/5; printf("%.2lf ",d);printf("\n"); for(int c=0;c<5;c++){ if(a[c]>d){ printf("%.0lf ",a[c]); } } }