Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119680 | 谢佳辰 | 计算平均数 | C++ | Accepted | 1 MS | 272 KB | 316 | 2025-05-18 14:36:45 |
#include <bits/stdc++.h> using namespace std; int main(){ int a[5],i; double o=0,c=0; for(i=0;i<5;i++){ cin>>a[i]; o+=a[i]; } c=o/5; cout<<fixed<<setprecision(2)<<c<<endl; for(i=0;i<5;i++){ if(a[i]>c){ cout<<a[i]<<" "; } } }