Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103159 | 黄思翔 | 计算平均数 | C++ | Wrong Answer | 0 MS | 276 KB | 311 | 2024-12-28 12:24:30 |
#include <bits/stdc++.h> using namespace std; int main(){ int n=5; int a[n]; for(int i=0;i<=4;i++){ cin>>a[i]; } int b=0; for(int i=0;i<=4;i++){ b=b+a[i]; } float c; c=b*1.0/n; printf("%.2f\n",c); for(int i=0;i<=4;i++){ if(c<a[i]){ cout<<a[i]; } } return 0; }
------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
427.60 679849