#K2666. Movie End Time Calculation
Movie End Time Calculation
Movie End Time Calculation
Given the starting time of a movie in HH:MM (24-hour) format and its duration in minutes, your task is to calculate the end time of the movie. Note that the movie may end on the next day.
Let the starting time be given as \(HH:MM\) and the duration be \(D\) minutes. The end time is computed as \(\text{end\_time} = \text{start\_time} + D \text{ minutes}\) (modulo 24 hours).
inputFormat
The input consists of a single line containing a string and an integer separated by a space. The string represents the starting time in HH:MM (24-hour) format, and the integer represents the movie duration in minutes.
For example: 14:30 90
outputFormat
The output should be a single line containing the end time of the movie in HH:MM (24-hour) format.
For example, given the sample input above, the output should be: 16:00
14:30 90
16:00