HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Problems from Olympiads.ru > problem:


217. 50253 - Timer

Guest
• Discussion of problem (1)

Volume problems

• 107a. 50240 - The numbers that are...
• 107b. 50242 - Numbers whose sum...
• 113. 50241 - Greatest common divisor
• 127b. 50730 - The largest product
• 127c. 50731 - The largest product (2)
• 138. 50732 - Sorting
• 147. 50251 - Symmetric matrix
• 213. 50769 - Arithmetic expression
• 217. 50253 - Timer
• 133. 50239 - Eating cheese
• 159. 50668 - Triangle
• 206. 50252 - Birthday
• 234. 50249 - Ladders
• 235. 50250 - The Knight
• 272. 50707 - Rebus
• 240. 50247 - Missing numbers
• 275. 50691 - The traveling salesma...

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