結果

問題 No.70 睡眠の重要性!
ユーザー mitsushinomitsushino
提出日時 2018-03-27 17:28:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 21 ms / 5,000 ms
コード長 481 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 8,900 KB
最終ジャッジ日時 2023-09-07 19:02:08
合計ジャッジ時間 935 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,732 KB
testcase_01 AC 21 ms
8,724 KB
testcase_02 AC 18 ms
8,788 KB
testcase_03 AC 19 ms
8,816 KB
testcase_04 AC 19 ms
8,864 KB
testcase_05 AC 19 ms
8,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import datetime

second_sum = 0
n = int(input())
for _ in range(n):
    time_list = input().split(' ')
    time1 = time_list[0].split(':')
    time2 = time_list[1].split(':')
    d1 = datetime.datetime(1900, 1, 1, int(time1[0]), int(time1[1]), 0)
    d2 = datetime.datetime(1900, 1, 1, int(time2[0]), int(time2[1]), 0)
    if d1 > d2:
        d2 = datetime.datetime(1900, 1, 2, int(time2[0]), int(time2[1]), 0)
    td = d2 - d1
    second_sum += td.seconds
print(second_sum // 60)
0