| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73166 | 邓嘉瑶 | 计算平均数 | C++ | Accepted | 1 MS | 272 KB | 290 | 2024-05-18 10:54:48 |
#include<bits/stdc++.h> using namespace std; int main() { int arr[5],sum=0; int i; for(i=0; i<=4; i++) { cin>>arr[i]; sum+=arr[i]; } double pj=1.0*sum/5; printf("%.2lf ",pj); for(int i=0; i<=4; i++) { if(arr[i]>pj) { cout<<arr[i]<<" "; } } return 0; }