10290_Avoidingadisaster

2022-5-16 18:16| 发布者: Hocassian| 查看: 56| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504733859400-Problem List-采集的数据-后羿采集器.html

Pro.ID

10290

Title

Avoiding a disaster

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=10290

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    Percy likes to be punctual. So much so that he always keeps three watches with him, so that he can be sure exactly what the time is. However, Percy's having a bad day. He found out that one of his watches was giving the wrong time. What's worse, when he went to correct the watch, he corrected the wrong one! That is, one watch was running x minutes behind (where x ≤ 480) and he wound one of the other watches x minutes forward. He now has three watches reading three different times, and hence is in serious danger of being tardy. Can you help Percy by writing a program that takes in the three times displayed on the watches and returns the correct time?

    输入

    The input begins with an integer T indicating the number of cases that follow (0 < T < 100). Each of the following T lines contains one test case, made up of three readings, separated by single space characters:   H1:M1 H2:M2 H3:M3   In each reading H1,H2,H3 represent the hours displayed ( 0 < H1, H2, H3 < 13 ), and M1,M2,M3 represent the minutes displayed ( 0 ≤ M1, M2, M3 < 60 ).

    If the number of minutes is less than 10, a leading 0 is perpended.

    输出

    Description

    Percy likes to be punctual. So much so that he always keeps three watches with him, so that he can be sure exactly what the time is. However, Percy's having a bad day. He found out that one of his watches was giving the wrong time. What's worse, when he went to correct the watch, he corrected the wrong one! That is, one watch was running x minutes behind (where x ≤ 480) and he wound one of the other watches x minutes forward. He now has three watches reading three different times, and hence is in serious danger of being tardy. Can you help Percy by writing a program that takes in the three times displayed on the watches and returns the correct time?

    Input

    The input begins with an integer T indicating the number of cases that follow (0 < T < 100). Each of the following T lines contains one test case, made up of three readings, separated by single space characters:   H1:M1 H2:M2 H3:M3   In each reading H1,H2,H3 represent the hours displayed ( 0 < H1, H2, H3 < 13 ), and M1,M2,M3 represent the minutes displayed ( 0 ≤ M1, M2, M3 < 60 ).

    If the number of minutes is less than 10, a leading 0 is perpended.

    Output

    For each test case, one line should be produced, formatted exactly as follows: "The correct time is Hi:Mi". If the number of minutes is less than 10, a leading 0 should be added. If the number of hours is less than 10, a leading 0 should NOT be added. If it is impossible to tell the time from the three readings, print the string: "Look at the sun".

    Sample Input

    3
    5:00 12:00 10:00
    11:59 12:30 1:01
    12:00 4:00 8:00

    Sample Output

    The correct time is 5:00
    The correct time is 12:30
    Look at the sun

    Source

    样例输入

    3
    5:00 12:00 10:00
    11:59 12:30 1:01
    12:00 4:00 8:00

    样例输出

    The correct time is 5:00
    The correct time is 12:30
    Look at the sun

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部