Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
127708 袁梓豪 计算平均数 C++ Accepted 1 MS 272 KB 352 2025-07-28 17:21:51

Tests(10/10):


Code:

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