蓝桥杯 来点三岁的
以前的a组这个难度 求大家别卷了
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
long long sum = 0;
int min1 = 100, max1 = 0;
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
min1 = min(min1, temp);
max1 = max(max1, temp);
sum += temp;
}
double avg = 1.0 * sum / n;
cout << max1 << endl << min1 << endl;
// 注意几位小数的输出
cout.precision(2);
cout << fixed;
cout << avg;
// 请在此输入您的代码
return 0;
}