Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121570 李杺隆 计算平均数 C++ Accepted 1 MS 272 KB 268 2025-06-07 16:57:43

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int n[5],sum=0; float pj; for(int i=0;i<=4;i++) { cin>>n[i]; sum+=n[i]; } pj=float(sum)/5; printf("%.2f\n",pj); for(int i=0;i<=4;i++) if(n[i]>pj) cout<<n[i]<<" "; return 0; }