| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 121432 | 糜宗易 | 18统计成绩 | C++ | Compile Error | 0 MS | 0 KB | 371 | 2025-06-07 12:58:52 |
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int max,min; for(int i=0;i<n;i++){ b = b + a[i]; if (max < a[i]){ max = a[i]; } if (min > a[i]) { min = a[i]; } } printf("%d %.2lf %d %d", b, b * 1.0 / n, max, min); return 0; }
Main.cc: In function 'int main()':
Main.cc:13:3: error: 'b' was not declared in this scope
b = b + a[i];
^
Main.cc:22:27: error: 'b' was not declared in this scope
printf("%d %.2lf %d %d", b, b * 1.0 / n, max, min);
^