Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150150 袁梓豪 18统计成绩 C++ Accepted 1 MS 276 KB 521 2026-03-22 13:01:55

Tests(10/10):


Code:

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