| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147559 | 鸡哥 | 计算平均数 | C++ | Accepted | 1 MS | 272 KB | 331 | 2026-02-06 10:20:27 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[5];//int longlong整数 double f=0;//double float 小数 for(int i = 0;i<5;i++){ cin>>a[i]; f+=a[i]; } printf("%.2f\n",f/5.0);//整数除整数结果为整数 for(int i = 0;i<5;i++){ if(a[i]>f/5){ cout<<a[i]<<" "; } } return 0; }