結果

問題 No.70 睡眠の重要性!
ユーザー otsuneko
提出日時 2021-05-07 01:17:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 285 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 82,268 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-09-14 15:52:16
合計ジャッジ時間 928 ms
ジャッジサーバーID
(参考情報)
judge6 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

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