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.
InputThe 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.
OutputThe 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).
ExampleInput5 2 2 8 1 5Output
3.6 2.0 2 7