結果

問題 No.70 睡眠の重要性!
ユーザー R NR N
提出日時 2020-08-22 16:49:27
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 367 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-08-05 13:46:16
合計ジャッジ時間 929 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,764 KB
testcase_01 AC 15 ms
7,804 KB
testcase_02 AC 16 ms
7,768 KB
testcase_03 AC 15 ms
7,840 KB
testcase_04 AC 15 ms
7,908 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:utf-8
n = int(input())
total = 0
for i in range(n):
    s, g = map(str, input().split())
    sl = list(map(int,s.split(':')))
    gl = list(map(int,g.split(':')))
    if gl[0] - sl[0] < 0:
        dt1 = gl[0] + 24 - sl[0]
        dt2 = gl[1] - sl[1]
    else:
        dt1 = gl[0] - sl[0]
        dt2 = gl[1] - sl[1]
    total += (dt1 * 60) + dt2
print(total)
0