HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50325 - How much time passed?

Guest
• Review clarifications (1)

Section problems

• 50355 - Bills of City Water Company
• 50467 - Random Numbers
• 50298 - Coins
• 50591 - Leap year
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50393 - Palindromic Numbers
• 50375 - Area of Circles
• 50325 - How much time passed?
• 50580 - Days passed

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.
Prepared by Ibrahim Mesecan.

How much time passed?

The boss Mr. Ervin Shehu is a very punctual man. That's why, he has decided to buy a new electronic card system which records the coming and leaving times of the staff. Mr. Shehu wants you to write a program to calculate the work time of the staff from their electronics card information.

Input specification
You will be given two time informations in a line separated by a space (time1 time2). Every time information contains three integers separated by two semicolons ':' (hh:mm:ss hh:mm:ss) where 0 ≤ hour ≤ 23, and 0 ≤ minute, second ≤ 59. And, it's guaranteed that time1 < time2.

Output specification
Give three integers (hours:minutes:seconds) separated by semicolons ':' which represent the time passed between the two given times.

 Sample Input I  
  8:30:26 12:48:54
 Sample Output I  
  4:18:28
 Sample Input II  
  18:12:15 22:23:54
 Sample Output II  
  4:11:39

Note: In MS. Excel, you can subtract a time from another as in the figure below.
  


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

www.contester.ru