QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#372831#5279. New TimeFOY#AC ✓10ms9580kbPython3360b2024-03-31 19:43:412024-03-31 19:43:42

Judging History

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

  • [2024-03-31 19:43:42]
  • 评测
  • 测评结果:AC
  • 用时:10ms
  • 内存:9580kb
  • [2024-03-31 19:43:41]
  • 提交

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+1)%24 != h2):
        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: 10ms
memory: 9464kb

input:

11:57
12:00

output:

3

result:

ok 1 number(s): "3"

Test #2:

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

input:

09:09
21:21

output:

24

result:

ok 1 number(s): "24"

Test #3:

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

input:

19:44
08:50

output:

19

result:

ok 1 number(s): "19"

Test #4:

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

input:

13:45
17:58

output:

17

result:

ok 1 number(s): "17"

Test #5:

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

input:

02:57
21:05

output:

26

result:

ok 1 number(s): "26"

Test #6:

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

input:

18:15
22:59

output:

48

result:

ok 1 number(s): "48"

Test #7:

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

input:

18:12
09:42

output:

45

result:

ok 1 number(s): "45"

Test #8:

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

input:

00:00
00:00

output:

0

result:

ok 1 number(s): "0"

Test #9:

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

input:

00:00
23:59

output:

82

result:

ok 1 number(s): "82"

Test #10:

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

input:

23:59
00:00

output:

1

result:

ok 1 number(s): "1"

Test #11:

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

input:

23:59
23:59

output:

0

result:

ok 1 number(s): "0"

Test #12:

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

input:

18:55
18:55

output:

0

result:

ok 1 number(s): "0"

Test #13:

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

input:

18:54
18:55

output:

1

result:

ok 1 number(s): "1"

Test #14:

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

input:

18:56
18:55

output:

82

result:

ok 1 number(s): "82"

Test #15:

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

input:

18:59
19:00

output:

1

result:

ok 1 number(s): "1"

Test #16:

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

input:

09:00
08:59

output:

82

result:

ok 1 number(s): "82"

Test #17:

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

input:

01:43
22:26

output:

63

result:

ok 1 number(s): "63"

Test #18:

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

input:

17:23
23:04

output:

46

result:

ok 1 number(s): "46"

Test #19:

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

input:

01:47
17:42

output:

70

result:

ok 1 number(s): "70"

Test #20:

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

input:

09:56
19:55

output:

68

result:

ok 1 number(s): "68"

Test #21:

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

input:

17:36
20:33

output:

59

result:

ok 1 number(s): "59"

Test #22:

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

input:

09:09
22:55

output:

59

result:

ok 1 number(s): "59"

Test #23:

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

input:

17:49
16:32

output:

65

result:

ok 1 number(s): "65"

Test #24:

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

input:

01:13
09:10

output:

64

result:

ok 1 number(s): "64"

Test #25:

score: 0
Accepted
time: 2ms
memory: 9472kb

input:

17:22
11:23

output:

19

result:

ok 1 number(s): "19"

Test #26:

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

input:

23:56
11:17

output:

32

result:

ok 1 number(s): "32"

Test #27:

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

input:

07:20
04:38

output:

39

result:

ok 1 number(s): "39"

Test #28:

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

input:

23:01
14:16

output:

30

result:

ok 1 number(s): "30"

Test #29:

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

input:

23:25
16:38

output:

30

result:

ok 1 number(s): "30"

Test #30:

score: 0
Accepted
time: 6ms
memory: 9476kb

input:

15:58
09:31

output:

50

result:

ok 1 number(s): "50"

Test #31:

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

input:

07:22
19:45

output:

35

result:

ok 1 number(s): "35"

Test #32:

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

input:

07:46
20:23

output:

49

result:

ok 1 number(s): "49"

Test #33:

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

input:

00:11
22:44

output:

55

result:

ok 1 number(s): "55"

Test #34:

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

input:

08:51
16:22

output:

38

result:

ok 1 number(s): "38"

Test #35:

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

input:

00:23
01:51

output:

29

result:

ok 1 number(s): "29"

Test #36:

score: 0
Accepted
time: 6ms
memory: 9360kb

input:

02:22
21:05

output:

61

result:

ok 1 number(s): "61"

Test #37:

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

input:

00:19
00:19

output:

0

result:

ok 1 number(s): "0"

Test #38:

score: 0
Accepted
time: 2ms
memory: 9404kb

input:

23:47
23:48

output:

1

result:

ok 1 number(s): "1"

Test #39:

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

input:

07:47
07:49

output:

2

result:

ok 1 number(s): "2"

Test #40:

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

input:

10:59
11:03

output:

4

result:

ok 1 number(s): "4"

Test #41:

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

input:

17:23
17:31

output:

8

result:

ok 1 number(s): "8"

Test #42:

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

input:

16:31
16:47

output:

16

result:

ok 1 number(s): "16"

Test #43:

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

input:

14:34
14:58

output:

24

result:

ok 1 number(s): "24"

Test #44:

score: 0
Accepted
time: 6ms
memory: 9428kb

input:

22:34
23:33

output:

59

result:

ok 1 number(s): "59"

Test #45:

score: 0
Accepted
time: 2ms
memory: 9408kb

input:

21:09
22:09

output:

1

result:

ok 1 number(s): "1"

Test #46:

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

input:

05:09
06:10

output:

2

result:

ok 1 number(s): "2"

Test #47:

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

input:

19:33
21:08

output:

36

result:

ok 1 number(s): "36"

Test #48:

score: 0
Accepted
time: 6ms
memory: 9568kb

input:

18:07
20:06

output:

60

result:

ok 1 number(s): "60"

Test #49:

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

input:

18:17
20:17

output:

2

result:

ok 1 number(s): "2"

Test #50:

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

input:

02:17
04:18

output:

3

result:

ok 1 number(s): "3"

Test #51:

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

input:

14:03
18:05

output:

6

result:

ok 1 number(s): "6"

Test #52:

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

input:

04:20
11:19

output:

65

result:

ok 1 number(s): "65"

Test #53:

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

input:

08:46
15:46

output:

7

result:

ok 1 number(s): "7"

Test #54:

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

input:

17:34
05:23

output:

60

result:

ok 1 number(s): "60"

Test #55:

score: 0
Accepted
time: 6ms
memory: 9468kb

input:

12:57
00:56

output:

70

result:

ok 1 number(s): "70"

Test #56:

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

input:

17:23
05:23

output:

12

result:

ok 1 number(s): "12"

Test #57:

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

input:

16:51
04:52

output:

13

result:

ok 1 number(s): "13"

Test #58:

score: 0
Accepted
time: 6ms
memory: 9580kb

input:

22:22
10:33

output:

23

result:

ok 1 number(s): "23"

Test #59:

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

input:

04:40
21:40

output:

17

result:

ok 1 number(s): "17"

Test #60:

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

input:

04:08
21:09

output:

18

result:

ok 1 number(s): "18"

Test #61:

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

input:

14:40
10:38

output:

77

result:

ok 1 number(s): "77"

Test #62:

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

input:

14:43
12:42

output:

80

result:

ok 1 number(s): "80"

Test #63:

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

input:

19:09
17:09

output:

22

result:

ok 1 number(s): "22"

Test #64:

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

input:

18:37
16:38

output:

23

result:

ok 1 number(s): "23"

Test #65:

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

input:

01:55
00:20

output:

47

result:

ok 1 number(s): "47"

Test #66:

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

input:

20:35
19:34

output:

81

result:

ok 1 number(s): "81"

Test #67:

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

input:

19:10
18:10

output:

23

result:

ok 1 number(s): "23"

Test #68:

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

input:

18:38
17:39

output:

24

result:

ok 1 number(s): "24"

Test #69:

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

input:

19:11
18:47

output:

59

result:

ok 1 number(s): "59"

Test #70:

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

input:

12:57
12:41

output:

67

result:

ok 1 number(s): "67"

Test #71:

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

input:

11:00
10:52

output:

75

result:

ok 1 number(s): "75"

Test #72:

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

input:

21:40
21:36

output:

79

result:

ok 1 number(s): "79"

Test #73:

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

input:

05:08
05:06

output:

81

result:

ok 1 number(s): "81"

Test #74:

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

input:

04:36
04:35

output:

82

result:

ok 1 number(s): "82"