結果

問題 No.70 睡眠の重要性!
ユーザー ohanaohana
提出日時 2023-10-20 12:56:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 5,000 ms
コード長 249 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,512 KB
実行使用メモリ 53,320 KB
最終ジャッジ日時 2023-10-20 12:56:47
合計ジャッジ時間 947 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,320 KB
testcase_01 AC 39 ms
53,320 KB
testcase_02 AC 39 ms
53,320 KB
testcase_03 AC 39 ms
53,320 KB
testcase_04 AC 41 ms
53,320 KB
testcase_05 AC 38 ms
53,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0

for i in range(n):
    a, b = input().split()
    h, m = map(int, a.split(":"))
    x1 = h * 60 + m
    h, m = map(int, b.split(":"))
    x2 = h * 60 + m
    if x1 > x2:
        x2 += 24 * 60
    ans += x2 - x1

print(ans)
0