結果

問題 No.586 ダブルブッキング
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2019-12-22 21:35:19
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-14 17:51:32
合計ジャッジ時間 1,019 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

yuki_money = int(input())
another_money = int(input())
n = int(input())
r_list = [int(input()) for i in range(n)]

r_clc = collections.Counter(r_list)
c = 0

for cur_key in r_clc.keys():
    rsv = r_clc[cur_key]
    c += (yuki_money + another_money) * (rsv - 1)
    
res = c

print(res)
0