All problems

Two Different Scales, One Chart (Twin Axes)

hardPythonMatplotlibtwinx

A field station charts temperature and rainfall for the same run of days. Temperature sits in the tens while rainfall is measured in fractions of an inch, so drawn against one scale the rainfall line lies flat along the bottom and tells the reader nothing. The station's chart therefore gives each series its own vertical scale while they share the same run of days along the bottom, which keeps the two shapes comparable in time even though their units have nothing in common. The caption under the chart states the average temperature over the period, and the caption is what is checked here.

Task: Print the average temperature across the days.

Input

The first line holds an integer n, the number of days. Each of the next n lines holds a day number, that day's temperature and that day's rainfall, separated by single spaces.

Output

One line holding the mean of the daily temperatures, written with exactly one decimal place.

Example:

Input:
3
1 70 0.1
2 75 0.0
3 68 0.5

Output:
71.0

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…