Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6841 吴承熹 计算平均数 C++ Wrong Answer 0 MS 256 KB 550 2025-03-22 13:55:15

Tests(2/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<iomanip> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n=0,a[6]; double s; for(int i=1;i<=5;i++){ cin>>a[i]; n=n+a[i]; } s=n/5.0; cout<<fixed<<setprecision(2)<<s<<endl; for(int i=0;i<=5;i++){ if(a[i]>s){ cout<<a[i]<<" "; } } return 0; }


Run Info:

------Input------
556 421 792 344 344
------Answer-----
491.40 556 792
------Your output-----
491.40 106665544 556 792