結果

問題 No.70 睡眠の重要性!
ユーザー otsunekootsuneko
提出日時 2021-05-07 01:17:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 285 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 71,372 KB
最終ジャッジ日時 2023-10-12 17:18:34
合計ジャッジ時間 1,243 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,088 KB
testcase_01 AC 72 ms
71,204 KB
testcase_02 AC 70 ms
71,356 KB
testcase_03 AC 71 ms
71,176 KB
testcase_04 AC 70 ms
71,336 KB
testcase_05 AC 72 ms
71,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 0
for _ in range(N):
    sleep, awake = map(str,input().split())
    H1,H2 = map(int,sleep.split(":"))
    h1,h2 = map(int,awake.split(":"))

    if H1 > h1 or (H1 == 0 and h1 == 0 and H2 > h2):
        h1 += 24
    ans += (h1-H1)*60 + h2-H2
print(ans)
0