407184: GYM102697 155 Array Statistics

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

155. Array Statisticstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

For this task, you will be required to find a set of simple statistics based on a given set of data. Data will be provided as an array of integers, and you will be tasked with finding the mean, median, mode, and range of the data.

Input

The first line will contain $$$n$$$, the number of values in the array. The second line will contain space-separated integers that correspond to the array of input values.

Output

The output should print the mean, median, mode, and range of the provided data in order and separated by lines(ie. the first line has the mean, the second line has the median, etc).

ExampleInput
5
2 2 8 1 5
Output
3.6
2.0
2
7

加入题单

上一题 下一题 算法标签: