Under construction

Still being built. Things may change

Salt Bomb

Interview

Time limit2sMemory limit512 MB

Summary
Given two clock times, compute how long the arm waits, treating an earlier target as the next day; print the wait in hh:mm:ss.
Level

Easy3 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

After failing a chemistry exam, Cheolsu decided to play a trick on his chemistry teacher.

Cheolsu hid a homemade robotic arm on the teacher's desk. He wants to program it so that at a fixed moment the arm dumps a pile of salt into the water cup the teacher always drinks from.

Cheolsu knows the current time and the time the salt should drop, but he is bad at arithmetic and cannot work out the waiting time to enter into the arm. Given the two times, find how long the arm has to wait.

Input

The first line contains the current time in hh:mm:ss format. The hour is between 00 and 2323, the minute and the second are each between 00 and 5959, and every value is padded to two digits.

The second line contains the salt drop time in the same format.

Output

Print on one line the waiting time from the current time to the salt drop time, in hh:mm:ss format. Pad every value to two digits.

If the salt drop time is earlier than the current time, it refers to that time on the next day. The waiting time is at least 11 second and at most 2424 hours, so print 24:00:00 when the two times are equal.

Examples5

  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
    
  3. Example 3

    Input
    00:00:00
    00:00:00
    
    Expected output
    24:00:00
    
  4. Example 4

    Input
    23:59:59
    00:00:00
    
    Expected output
    00:00:01
    
  5. Example 5

    Input
    01:02:03
    04:05:06
    
    Expected output
    03:03:03