All problems

Choosing Error-Bar Type With errorbar

hardPythonSeabornerrorbar

Halden Cycle Hire's three depots keep filing wildly different counts for the same day, and the operations lead wants that disagreement quantified rather than described. The chart already shades a band around each day to hint at the spread; the report needs the day-1 spread as a number, in the same units as the counts themselves.

Task: Print how spread out the day-1 values are.

Input

The first line holds one integer n, the number of readings, where 1 <= n <= 1000. Then come n lines, each holding a day number and a value separated by a single space. A day repeats when several depots reported on it.

Output

One line holding the sample standard deviation of the day-1 values -- the version that treats those readings as a sample drawn from a larger population rather than as the whole of it -- rounded to 2 decimal places. If day 1 has fewer than two readings, print 0.00.

Example:

Input:
4
1 10
1 20
1 30
2 5

Output:
10.00

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…