結果

問題 No.70 睡眠の重要性!
ユーザー brthyyjpbrthyyjp
提出日時 2021-05-20 19:58:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 267 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-04-18 14:07:34
合計ジャッジ時間 1,081 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,712 KB
testcase_01 AC 41 ms
52,224 KB
testcase_02 AC 43 ms
51,712 KB
testcase_03 AC 43 ms
52,096 KB
testcase_04 AC 41 ms
51,968 KB
testcase_05 AC 43 ms
51,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for i in range(n):
    s, t = map(str, input().split())
    h1, m1 = map(int, s.split(':'))
    h2, m2 = map(int, t.split(':'))
    s = h1*60+m1
    t = h2*60+m2
    if s <= t:
        ans += t-s
    else:
        ans += t+24*60-s
print(ans)
0