All problems

A Multi-Line Text Box on a Chart

mediumPythonMatplotlibplt.text

Harbourline Retail charts till-queue lengths sampled through the day, and pins a small summary box in the corner of the chart so a reader gets the headline without measuring anything. The box holds two numbers: the average queue and how much the queue varies around that average. Those same two numbers are read out in the daily briefing, which is the text graded here.

Task: Print the average sample and the spread of the samples.

Input

The first line holds one integer n, the number of samples. Each of the next n lines holds one sample, a number on its own.

Output

Two lines. The first is the average, the second is the population standard deviation — the version that treats these samples as the entire group of interest, not as a small sample standing in for a larger one. Both carry exactly two decimal places.

Example:

Input:
4
10
20
30
40

Output:
25.00
11.18

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…