Under construction

Still being built. Things may change

Time Until the Warning

Interview

Time limit1sMemory limit128 MB

Summary
Given current time and a future warning time in a day, compute the wait time as a difference modulo 24 hours, printing 24:00:00 if they match.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

You are given the current time and the time when a warning will begin. Both times are times within a 24-hour day.

Compute how long you must wait until the warning begins. The waiting time is at least 1 second and at most 24 hours. Therefore, if the two times are the same, wait until the same time on the next day and output 24:00:00.

Input

The first line contains the current time in the format hh:mm:ss.

The second line contains the warning time in the same format.

hh is an integer from 0 to 23, and mm and ss are each integers from 0 to 59.

Output

Print the required waiting time in the format hh:mm:ss. If the required wait is 24 hours, print 24:00:00.

Examples2

  1. Example 1

    Input
    20:00:00
    04:00:00
    
    Expected output
    08:00:00
    
  2. Example 2

    Input
    12:34:56
    14:36:22
    
    Expected output
    02:01:26