CF387A.George and Sleep

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

George woke up and saw the current time ss on the digital clock. Besides, George knows that he has slept for time tt .

Help George! Write a program that will, given time ss and tt , determine the time pp when George went to bed. Note that George could have gone to bed yesterday relatively to the current time (see the second test sample).

输入格式

The first line contains current time ss as a string in the format "hh:mm". The second line contains time tt in the format "hh:mm" — the duration of George's sleep. It is guaranteed that the input contains the correct time in the 24-hour format, that is, 00<=hh<=2300<=hh<=23 , 00<=mm<=5900<=mm<=59 .

输出格式

In the single line print time pp — the time George went to bed in the format similar to the format of the time in the input.

输入输出样例

  • 输入#1

    05:50
    05:44
    

    输出#1

    00:06
    
  • 输入#2

    00:00
    01:00
    

    输出#2

    23:00
    
  • 输入#3

    00:01
    00:00
    

    输出#3

    00:01
    

说明/提示

In the first sample George went to bed at "00:06". Note that you should print the time only in the format "00:06". That's why answers "0:06", "00:6" and others will be considered incorrect.

In the second sample, George went to bed yesterday.

In the third sample, George didn't do to bed at all.

首页