You have bought a car to drive from Waterloo to a big city. The car's odometer is broken, so you cannot measure distance directly. However, the speedometer and cruise control both work, so the car can hold a constant speed that you adjust from time to time in response to speed limits, traffic jams, and border queues. You also have a stopwatch, and you note the elapsed time since the start of the trip every time the speed changes.
From time to time you wonder, "how far have I come?" To answer this, write a program to run on the laptop in the passenger seat.
Standard input consists of several lines, each of which is one of the following:
hh:mm:ss since the start of the trip, followed by the new speed in km/h (an integer), separated by a space.hh:mm:ss.At the start of the trip (elapsed time 0) the car is stationary (speed 0). Elapsed times are given in non-decreasing order, and there is at most one speed change at any given time.
For each query, print one line. First write the query's elapsed time in hh:mm:ss format, then a single space, then the total distance travelled up to that time in kilometres, rounded to two decimal places, followed by km.