Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
127831 葛锦东 计算平均数 C++ Accepted 1 MS 276 KB 363 2025-07-29 14:59:12

Tests(10/10):


Code:

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