eolymp
bolt
Try our new interface for solving problems
Problems

Таймер

Таймер

Timer - a clock that can beep after a certain period of time. Write a program that determines when to be beeps. Timer - a clock that can beep after a certain period of time. Write a program that determines when to be beeps.Timer - a clock that can beep after a certain period of time. Write a program that determines when to be beeps. \InputFile The first line of the input file is written the current time in \textbf{HH}:\textbf{MM}:\textbf{SS} (with leading zeros). At the same time it satisfies the constraints: \textbf{hh} - \textbf{00} to \textbf{23}, \textbf{MM} and \textbf{SS} - \textbf{00} to \textbf{60}. The second line is recorded the time interval to be measured. The interval is in the format \textbf{H}:\textbf{M}:\textbf{S} (where \textbf{H}, \textbf{M} and \textbf{S} - from \textbf{0} to \textbf{10^9}, without leading zeros). In addition, if \textbf{H} = \textbf{0} (or \textbf{H} = \textbf{0} and \textbf{M} = \textbf{0}), then they can be omitted. For example, \textbf{100}:\textbf{60} really mean \textbf{100} minute \textbf{60} seconds, which is the same as \textbf{101}:\textbf{0} or \textbf{1}:\textbf{41}:\textbf{0}. \textbf{42} stands for \textbf{42} seconds. \textbf{100}:\textbf{100}:\textbf{100} - \textbf{100} hours, \textbf{100} minutes, \textbf{100} sec, which is the same as \textbf{101}:\textbf{41}:\textbf{40}. \OutputFile In the output file displayed in the format \textbf{HH}:\textbf{MM}:\textbf{SS} time, how much you hear a beep. Moreover, if the signal does not sound in the current day, then it should continue to follow the record + \textbf{<number> days}. For example, if the signal will sound the next day - a \textbf{+1 days}. \InputFile В первой строке входного файла записано текущее время в формате \textbf{ЧЧ}:\textbf{ММ}:\textbf{СС} (с ведущими нулями). При этом оно удовлетворяет ограничениям: \textbf{ЧЧ} - от \textbf{00} до \textbf{23}, \textbf{ММ} и \textbf{СС} - от \textbf{00} до \textbf{60}. Во второй строке записан интервал времени, который должен быть измерен. Интервал записывается в формате \textbf{Ч}:\textbf{М}:\textbf{С} (где \textbf{Ч}, \textbf{М} и \textbf{С} - от \textbf{0} до \textbf{10^9}, без ведущих нулей). Дополнительно если \textbf{Ч}=\textbf{0} (или \textbf{Ч}=\textbf{0} и \textbf{М}=\textbf{0}), то они могут быть опущены. Например, \textbf{100}:\textbf{60} на самом деле означает \textbf{100} минут \textbf{60} секунд, что то же самое, что \textbf{101}:\textbf{0} или \textbf{1}:\textbf{41}:\textbf{0}. А \textbf{42} обозначает \textbf{42} секунды. \textbf{100}:\textbf{100}:\textbf{100} - \textbf{100} часов, \textbf{100} минут, \textbf{100} секунд, что то же самое, что \textbf{101}:\textbf{41}:\textbf{40}. \OutputFile В выходной файл выведите в формате \textbf{ЧЧ}:\textbf{ММ}:\textbf{СС} время, во сколько прозвучит звуковой сигнал. При этом если сигнал прозвучит не в текущие сутки, то дальше должна следовать запись + \textbf{<количество> days}. Например, если сигнал прозвучит на следующий день -- то \textbf{+1 days}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
01:01:01
48:0:0
Output example #1
01:01:01+2 days