提交时间:2025-08-28 16:35:18
运行 ID: 344959
#include<bits/stdc++.h> using namespace std; int main(){ int n,x,i=2,s=0,ma=-100,mi=200,p=1,tt; cin>>n>>tt; ma=mi=s=tt; while(i<=n){ cin>>x; s+=x; if(ma<x)ma=x; if(mi>x)mi=x; if(x>tt)p++; i++; } cout<<fixed<<setprecision(4)<<1.0*s/n<<endl; cout<<ma<<" "<<mi; cout<<p; return 0; }