| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80015 | 石晋骁 | 计算平均数 | C++ | Wrong Answer | 1 MS | 272 KB | 284 | 2024-07-11 10:28:59 |
#include<bits/stdc++.h> using namespace std; int a[6]; int main(){ double avg; for(int i = 1;i <= 5;i++){ cin>> a[i]; } avg = (a[1]+a[2]+a[3]+a[4]+a[5])/5.0; cout << avg; for(int j = 0;j < 6;j++){ if(a[j] > avg){ cout << a[j] << " "; } } return 0; }
------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
427.6679 849