Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
112298 | 陈骏睿 | 计算平均数 | C++ | Wrong Answer | 1 MS | 276 KB | 536 | 2025-03-09 12:40:26 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[5]={},n=0; double m; for(int i=0;i<5;i++){ cin>>a[i]; }for(int i=0;i<5;i++){ n+=a[i]; } m=n/5; printf("%.2lf\n",m); for(int i=0;i<5;i++){ if(a[i]>m){ cout<<a[i]<<" "; } } return 0; }
------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
427.00 679 849