Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110722 | 杨格丝特 | 计算平均数 | C++ | Time Limit Exceeded | 1000 MS | 268 KB | 602 | 2025-02-22 18:23:39 |
#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[6],i; double avg=0; double sum=0; for(i=1;1<=5;i++) { cin>>a[i]; sum+=a[i]; } avg=sum/5; printf("%.21f\n",sum/5); for (i=1;i<=5;i++) { if(a[i]>avg) { cout<<a[i]<<" "; } } return 0; }