結果

問題 No.989 N×Mマス計算(K以上)
ユーザー chinchillachinchilla
提出日時 2020-02-14 23:19:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 307 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 30,848 KB
最終ジャッジ日時 2024-10-06 13:19:35
合計ジャッジ時間 3,093 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
n, m, k = map(int, input().split())
op, *B = input().split()
print(sum(s*i for i, (_, s) in enumerate(sorted(
    [({"+":k-int(a), "*":(k-1)//int(a)+1}[op], 0) for a in sys.stdin] +
    [(int(b), 1) for b in B]))) - m*(m-1)//2)
0