Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
143697 何睿函 计算平均数 C++ Accepted 0 MS 280 KB 297 2026-01-17 15:14:24

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[5]; int x=0; for(int i=0;i<5;i++){ cin>>a[i]; } for(int i=0;i<5;i++){ x=x+a[i]; } double s=x*1.0/5; printf("%.2f\n",s); for(int i=0;i<5;i++){ if(a[i]>s){ cout<<a[i]<<" "; } } return 0; }