All problems

A Log-Scaled Seaborn Scatterplot

mediumPythonSeabornLog Scale

Fernbrook Analytics handles client data where the second measurement spans four orders of magnitude, and on ordinary axes ninety per cent of the records pile into the bottom corner. Stretching both axes so that equal MULTIPLES take equal space fixes the view. The headline figure has to match: the geometric mean, which is the average of multiplying rather than of adding, and is the right centre for data read that way.

Task: Print the geometric mean of the second measurement.

Input

The first line holds one integer n, the number of records. Each of the next n lines holds that record's two measurements, separated by a single space. Every value is above zero.

Output

One line holding the geometric mean of the SECOND measurement only, rounded to exactly two decimal places. The geometric mean of n values is the number that, multiplied by itself n times, gives the same product as multiplying all the values together.

Example:

Input:
3
1 10
2 20
3 40

Output:
20.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…