题目描述
样例
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a[10010];
double ave;
cin>>n;
int maxn=-1,minn=10010;
for(int i=0;i<n;i++)
{
cin>>a[i];
if(maxn<a[i])maxn=a[i];
if(minn>a[i])minn=a[i];
ave+=(double)a[i]/n;
}
cout<<maxn<<endl<<minn<<endl;
printf("%.2lf",ave);
return 0;
}