| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79420 | 蒙恒羽 | 计算平均数 | C++ | Wrong Answer | 1 MS | 272 KB | 435 | 2024-07-05 20:26:11 |
#include<iostream> #include<vector> using namespace std; int main(){ vector<int> a; for(int j=0;j<5;j++){ int i; cin>>i; a.push_back(i); } int abc = 0; for(int row:a){ abc += row; } float aabc = abc / 5; printf("%.2f", aabc); cout<<endl; for(int rrow:a){ if(rrow > abc / a.size()){ cout<<rrow<<" "; } } }
------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
427.00 679 849