| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 109805 | 胡海峰老师 | 计算平均数 | C++ | Accepted | 1 MS | 280 KB | 328 | 2025-02-12 09:31:02 |
#include <iostream> using namespace std; int main(){ int a[5]; int tot =0; for(int i=0;i<5;i++) { cin>>a[i]; tot += a[i]; } float avg = tot/5.0; printf("%.2f\n",avg); for(int j=0;j<5;j++) if(a[j]>avg) cout<< a[j]<<" "; return 0; } /* Input 1 2 3 4 5 Output 3.00 4 5 */