結果

問題 No.70 睡眠の重要性!
ユーザー ynyn
提出日時 2015-12-19 17:23:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 259 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-10-14 22:30:53
合計ジャッジ時間 654 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,820 KB
testcase_01 AC 14 ms
7,752 KB
testcase_02 AC 14 ms
7,768 KB
testcase_03 AC 14 ms
7,716 KB
testcase_04 AC 15 ms
7,944 KB
testcase_05 AC 14 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
time = 0

for i in range(N):
    S1, S2 = map(str, input().split())
    H, M = map(int, S1.split(":"))
    h, m = map(int, S2.split(":"))

    if H > h or (H == h and M > m):
        h += 24

    time += h*60 + m - (H*60 + M)
    
print(time)
0