結果

問題 No.70 睡眠の重要性!
ユーザー akitsugu777akitsugu777
提出日時 2018-10-23 13:26:18
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 9,932 KB
最終ジャッジ日時 2023-08-12 06:17:14
合計ジャッジ時間 1,161 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,912 KB
testcase_01 AC 30 ms
9,756 KB
testcase_02 AC 30 ms
9,716 KB
testcase_03 AC 31 ms
9,932 KB
testcase_04 AC 31 ms
9,772 KB
testcase_05 AC 31 ms
9,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import datetime

n = int(input())

x = 0
for i in range(n):
    t = input().split()
    t0 = datetime.datetime.strptime(t[0], '%H:%M')
    t1 = datetime.datetime.strptime(t[1], '%H:%M')
    t2 = t1 - t0
    h, m = divmod(t2.seconds//60, 60)
    m += h * 60
    x += m
    
print(x)
0