| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159332 | 杨正蠔 | 计算平均数 | C++ | Accepted | 1 MS | 272 KB | 532 | 2026-08-28 09:58:08 |
#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 x=0; int a[5]={}; for(int i=0;i<5;i++){ cin>>a[i]; x+=a[i]; } double p=x*1.0/5; printf("%.2lf",p); cout<<endl; for(int c=0;c<5;c++){ if(a[c]>p){ cout<<a[c]<<' '; } } return 0; }