Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153780 陈泊延 计算平均数 C++ Wrong Answer 1 MS 268 KB 513 2026-05-23 19:23:40

Tests(0/10):


Code:

#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(){ double p; int a[6],s=0; for(int i=1;i<=5;i++){ cin>>a[i]; s=s+a[i]; } p=s/5.0; printf("%.2lf\n",p); for(int i=p;i<=5;i++){ if(a[i]>p){ cout<<a[i]<<" "; } } return 0; }


Run Info:

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