Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: 666whynot
Problemset: RANGEandMEAN
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-03 16:26:14
#include <bits/stdc++.h>
using namespace std;
#define db double
int main(){
ios::sync_with_stdio(false);cin.tie(nullptr);
int n;cin >> n;
vector<int> v;
db aw = 0;
int mx = INT_MIN,mn = INT_MAX;
for(int i=0;i<n;i++){
int x;cin >> x;
aw += x;
if(x > mx)mx = x;
if(x < mn)mn = x;
}
cout << mx - mn << ' ';
cout << fixed << setprecision(2) << aw / n;
}