A Seaborn Line Plot Over Time
Halden Cycle Hire counts how many bikes come back to the depot each day. The morning dashboard already draws the trend from those counts; what the standup note still needs is one figure, the count for the most recent day. Depots upload whenever they get round to it, so the readings do not arrive in day order.
Task: Print the value recorded on the highest-numbered day.
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 that day's value, separated by a single space. Day numbers are whole numbers and no two readings share a day. The lines are not necessarily in day order.
Output
One line holding that day's value, rounded to 2 decimal places. It is the value belonging to the largest day number, which need not be the largest value in the upload.
Example:
Input:
3
1 10
2 20
3 30
Output:
30.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