Now that we have learned how to calculate the Mean, Median, and Mode
of a dataset with around 10 values, let's increase the size of that dataset to around 1000 values.
Given a much larger set of data, you will again be asked to calculate its Mean, Median, and Mode(s).
The size of the dataset is meant to discourage you from solving this by hand.
The recommended approach is to write a small program to analyze the data and return the answers.
See the help page for more information.
Input Data
The first will be Q, the quantity of datapoints in the dataset.
Q lines will then follow, each with a value in the dataset.
Answer
Should consist of the Mean, the Median, and then any Modes, with all values separated by a single space.
If multiple modes exist, list them in ascending order.
Error should be less than 1e-6.
Example
input data:
6
4
-3
1
4
7
-3
answer:
1.666667 2.5 -3 4