Time
Time limit1sMemory limit1024 MB
Given the departure and arrival times of three cars, find the shortest and longest trip durations and print them as hh:mm.
- Level
Easy2 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Three cars start a trip along the same route at different times and arrive at the final point at different times. Write a program time that finds the minimum and maximum time it took to cover the distance.
Input
The first three lines of standard input each contain four integers: the departure time and the arrival time of one car, given in hours and minutes. The numbers are separated by single spaces.
Output
The first line of standard output must contain the minimum time (in hours and minutes) needed to cover the distance. The second line must contain the maximum time. Print each time in the format hh:mm.
Constraints
,