Submission
Status:
---------P----------
Subtask/Task Score:
5/100
Score: 5
User: exoworldgd
Problemset: RANGEandMEAN
Language: cpp
Time: 0.004 second
Submitted On: 2025-09-24 19:13:33
#pragma GCC optimize("O5,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
#include <bits/stdc++.h>
#define exoworldgd cin.tie(0)->sync_with_stdio(0),cout.tie(0)
#define int long long
using namespace std;
const int inf = LLONG_MAX, mod = 1e9+7, maxn = 1e6+1;
signed main(void) {
int n,mx=-inf,mn=inf,sum=0;
cin >> n;
int a[n];
for (auto& i : a) cin >> i, mx = max(mx,i), mn=min(mn,i), sum += i;
cout << mx-mn << " " << fixed << setprecision(2) << (double)(sum/n);
}