結果

問題 No.70 睡眠の重要性!
コンテスト
ユーザー mitsushino
提出日時 2018-03-27 17:28:33
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 481 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 478 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2026-03-11 21:24:30
合計ジャッジ時間 1,605 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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