Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: pressoboi
Problemset: RANGEandMEAN
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-02 20:44:05
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
long long mx = -2e19,mn = 2e19,cnt=0;
for(int i=1;i<=n;i++){
long long x;
cin >> x;
cnt += x;
mn = min(mn,x);
mx = max(mx,x);
}
cout << mx-mn << " ";
cout << setprecision(2) << fixed << 1.00*cnt/n;
return 0;
}