結果

問題 No.70 睡眠の重要性!
ユーザー MitI_7MitI_7
提出日時 2015-12-06 13:47:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 353 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 9,920 KB
最終ジャッジ日時 2023-10-12 16:41:09
合計ジャッジ時間 1,022 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from datetime import datetime, timedelta


def main():
    n = int(input())
    t = timedelta(0)
    for _ in range(n):
        a, b = map(lambda x: datetime.strptime(x, "%H:%M"), input().split())
        if a > b:
            b += timedelta(days=1)
        t += b - a

    print(int(t.total_seconds()) // 60)
    
if __name__ == '__main__':
    main()
0