题目描述
Given the start time st and end time et of a race in the format hh:mm:ss. You task is to print the time taken to complete the race.
Example 1:
Input: st = 13:50:45
et = 14:55:50
Output: 01:05:05
Explaination: The time gap is 1 hour 5
minutes and 5 seconds.
Example 2:
Input: st = 12:00:00
et = 24:00:00
Output: 12:00:00
Explaination: The time gap is of 12 hours.
Your Task:
You do not need to read input or print anything. Your task is to complete the function timeGap() which takes st and et as input parameters and returns the time difference between them.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
0 ≤ hh ≤ 24
0 ≤ mm ≤ 59
0 ≤ ss ≤ 59
输入格式
见题面
输出格式
见题面
样例输入
st = 13:50:45
et = 14:55:50
样例输出
01:05:05