結果

問題 No.70 睡眠の重要性!
ユーザー ssmkzkssmkzk
提出日時 2018-06-07 13:13:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 5,000 ms
コード長 470 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 8,868 KB
最終ジャッジ日時 2023-09-12 23:00:11
合計ジャッジ時間 1,299 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,844 KB
testcase_01 AC 19 ms
8,716 KB
testcase_02 AC 19 ms
8,728 KB
testcase_03 AC 19 ms
8,712 KB
testcase_04 AC 20 ms
8,868 KB
testcase_05 AC 19 ms
8,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import datetime

N = int(input())
sum = 0
for i in range(N):
    l = list(map(str, input().split()))
    l1 = list(map(int, l[0].split(":")))
    l2 = list(map(int, l[1].split(":")))
    if l1[0] > l2[0]:
        d1 = datetime.datetime(2018, 6, 6,hour = l1[0], minute = l1[1])
    else:
        d1 = datetime.datetime(2018, 6, 7,hour = l1[0], minute = l1[1])
    d2 = datetime.datetime(2018, 6, 7, hour = l2[0], minute = l2[1])
    sum += (d2-d1).seconds

print(sum//60)
0