結果

問題 No.70 睡眠の重要性!
ユーザー otsunekootsuneko
提出日時 2021-05-07 01:08:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 1,870 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 71,448 KB
最終ジャッジ日時 2023-10-12 17:09:33
合計ジャッジ時間 3,057 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,156 KB
testcase_01 AC 71 ms
71,448 KB
testcase_02 AC 71 ms
71,100 KB
testcase_03 AC 72 ms
71,068 KB
testcase_04 AC 72 ms
70,924 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

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:
        h1 += 24
    if h2 < H2:
        ans += (h1-H1-1)*60 + 60+(h2-H2)
    else:
        ans += (h1-H1)*60 + h2-H2
print(ans)
0