Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Nitro_Legacy

Problemset: RANGEandMEAN

Language: cpp

Time: 0.002 second

Submitted On: 2026-09-29 14:02:50

#include <bits/stdc++.h>
using namespace std;
int main(){
    double n;
    cin >> n;
    vector<int> v(n);
    double sum = 0;
    for (int i = 0; i < n; i++){
        cin >> v[i];
        sum += v[i];
    }
    double mean = sum / n;
    sort(v.begin(), v.end());
    cout << v[n - 1] - v[0] << " ";
    printf("%.2f" ,mean);
    return 0;
}