HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50253 - Timer

Guest
• Discussion of problem (1)

Section problems

• 50346 - The Biggest Date
• 50512 - Coding redundancy
• 50528 - Rock-Scissors-Paper
• 50493 - n-digit kth Prime Number
• 50520 - Filling a Matrix Randomly
• 50454 - What day is it?
• 50474 - Sum of Two Primes
• 50597 - Drawing Diamonds
• 50253 - Timer
• 50294 - Centimeters to Yards
• 50303 - Pattern
• 50882 - FizzBuzz
• 50322 - Snake Pattern
• 50302 - Paper Scissors Rock
• 50396 - Cinema Tickets - 1
• 50366 - Student Averages (2 Grades)
• 50357 - Convert Euros into Dollars

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Alpha

Timer - a watch, which are able to beep after some period of time. Write a program that determines when should be beeps.

Enter
The first line contains the current time in HH: MM: SS (With leading zeros). At the same time it satisfies the restrictions: HH - 00 to 23 MM and SS - from 00 to 60.
The second line contains the time interval that should be measured. Interval recorded in the format h: m: s (where H, M and C - 0 to 10 9 , without leading zeros). Additionally, if H = 0 (or M = 0 and S = 0), then they can be omitted. For example, 100:60 really mean 100 minutes, 60 seconds that the same thing as 101:0 or 1:41:0. A 42 means 42 seconds. 100:100:100 - 100 hours, 100 minutes, 100 seconds, which is the same as that 101:41:40.
Output
Bring out the format HH: MM: SS time, how much time to beep sound. In this case, if the signal is not sounded in the current day, then it should continue to follow the record + days. For example, if the signal will be performed the next day - then +1 days.

input 1 Input 2 entering 3
01:01:01
48:0:0
01:01:01
58:119
23:59:59
1
Conclusion 1 Conclusion 2 Conclusion 3
01:01:01+2 days
02:01:00
00:00:00+1 days

Для отправки решений необходимо выполнить вход.

www.contester.ru