24-Hour Mission
InterviewTime limit2sMemory limit128 MB
Given the current time and a start time in HH:MM:SS, compute the time remaining until the start time next occurs within a 24-hour cycle.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Dohyun is an agent assigned to a special mission. He resolves a case only at the exact moment 24 hours have passed since the mission start time.
You are given the current time and the mission start time. Since time repeats every 24 hours, compute how much time remains from the current time until the next occurrence of the mission start time.
Every time is given from 00:00:00 through 23:59:59, and the answer must also be printed in HH:MM:SS format with two digits for each field.
Input
The first line contains the current time. The second line contains the mission start time.
The two times are never the same.
Output
Print the remaining time from the current time until the mission start time occurs again, in HH:MM:SS format.