All problems

The Sensor Average

easyPythonStatisticsI/O

Northwind Cold Storage keeps a temperature probe in every freezer room. Each probe writes one reading per hour into a log, and the overnight monitoring report has to state a single number for the shift: the average temperature the room held. The log arrives as plain lines of text and nothing else.

Task: Print the mean of the logged readings.

Input

The first line holds one integer n, the number of readings that follow. Each of the next n lines holds exactly one reading. A reading is a plain number; it may carry a decimal point and it may be negative. There is always at least one reading.

Output

One line holding the mean, written with exactly two digits after the decimal point. A mean of five is therefore printed as 5.00, never as 5.

Example:

Input:
3
10
20
25

Output:
18.33

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…