QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#372828#5279. New TimeFOY#TL 10ms9572kbPython3355b2024-03-31 19:41:592024-03-31 19:42:00

Judging History

你现在查看的是最新测评结果

  • [2024-03-31 19:42:00]
  • 评测
  • 测评结果:TL
  • 用时:10ms
  • 内存:9572kb
  • [2024-03-31 19:41:59]
  • 提交

answer

t1 = input()
t2 = input()
h1 = int(t1[:2])
m1 = int(t1[3:])
h2 = int(t2[:2])
m2 = int(t2[3:])
ans = 0
if (m2 < m1):
    while (h1 != h2-1):
        ans += 1
        h1 += 1
        h1 %= 24
else:
    while (h1 != h2):
        ans += 1
        h1 += 1
        h1 %= 24
while (m1 != m2):
    ans += 1
    m1 += 1
    m1 %= 60
print(ans)

详细

Test #1:

score: 100
Accepted
time: 9ms
memory: 9552kb

input:

11:57
12:00

output:

3

result:

ok 1 number(s): "3"

Test #2:

score: 0
Accepted
time: 7ms
memory: 9564kb

input:

09:09
21:21

output:

24

result:

ok 1 number(s): "24"

Test #3:

score: 0
Accepted
time: 9ms
memory: 9572kb

input:

19:44
08:50

output:

19

result:

ok 1 number(s): "19"

Test #4:

score: 0
Accepted
time: 4ms
memory: 9524kb

input:

13:45
17:58

output:

17

result:

ok 1 number(s): "17"

Test #5:

score: 0
Accepted
time: 10ms
memory: 9464kb

input:

02:57
21:05

output:

26

result:

ok 1 number(s): "26"

Test #6:

score: 0
Accepted
time: 0ms
memory: 9456kb

input:

18:15
22:59

output:

48

result:

ok 1 number(s): "48"

Test #7:

score: 0
Accepted
time: 4ms
memory: 9400kb

input:

18:12
09:42

output:

45

result:

ok 1 number(s): "45"

Test #8:

score: 0
Accepted
time: 5ms
memory: 9460kb

input:

00:00
00:00

output:

0

result:

ok 1 number(s): "0"

Test #9:

score: 0
Accepted
time: 3ms
memory: 9456kb

input:

00:00
23:59

output:

82

result:

ok 1 number(s): "82"

Test #10:

score: -100
Time Limit Exceeded

input:

23:59
00:00

output:


result: