Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79421 蒙恒羽 计算平均数 C++ Wrong Answer 0 MS 272 KB 516 2024-07-05 20:32:15

Tests(0/10):


Code:

#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 i=0;i<5;i++){ if(a[i] > abc / a.size()){ cout<<a[i]; if(i < 4){ cout<<" "; } } } }


Run Info:

------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
427.00 679 849