結果

問題 No.70 睡眠の重要性!
ユーザー TksiTksi
提出日時 2017-08-07 21:52:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 547 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-20 04:40:42
合計ジャッジ時間 666 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,880 KB
testcase_01 AC 27 ms
10,880 KB
testcase_02 AC 28 ms
10,880 KB
testcase_03 AC 27 ms
10,880 KB
testcase_04 AC 30 ms
10,880 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from datetime import datetime as dt
ary = []
sum = 0
for i in range(int(input())):
    ary.append([])
    ary[i] = input().split()
    tmp0 = list(map(int, ary[i][0].split(':')))
    tmp1 = list(map(int, ary[i][1].split(':')))
    if(tmp0[0] >= 12):
        ary[i][0] = (24 - tmp0[0] - 1) * 60 + (60 - tmp0[1])
    else:
        ary[i][0] = -(tmp0[0] * 60 + tmp0[1])
    if(tmp1[0] >= 12):
        ary[i][1] = (24 - tmp1[0] -1) * 60 + (60 - tmp1[1])
    else:
        ary[i][1] = tmp1[0] * 60 + tmp1[1]
    sum += ary[i][0] + ary[i][1]
print(sum)
0