Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: UNJE0o

Problemset: RANGEandMEAN

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-11 20:02:36

#include <bits/stdc++.h>
#define en '\n'
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    
    int n;cin >> n;
    long long arr[n];
    double sum = 0;

    for(int i = 0;i < n;i++){
        cin >> arr[i];
        sum += arr[i];
    }

    sum = sum/n;

    cout << *max_element(arr,arr+n) - *min_element(arr,arr+n) << " " << fixed << setprecision(2)<<  sum;

}