結果

問題 No.586 ダブルブッキング
ユーザー ABKZABKZ
提出日時 2021-07-20 13:45:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 71,700 KB
最終ジャッジ日時 2023-09-24 12:47:10
合計ジャッジ時間 2,347 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,608 KB
testcase_01 AC 95 ms
71,700 KB
testcase_02 AC 94 ms
71,452 KB
testcase_03 AC 94 ms
71,696 KB
testcase_04 AC 93 ms
71,576 KB
testcase_05 AC 94 ms
71,296 KB
testcase_06 AC 94 ms
71,608 KB
testcase_07 AC 93 ms
71,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

P1 = int(input())
P2 = int(input())
N = int(input())
R = [input() for _ in range(N)]

ans = 0
for _, cnt in collections.Counter(R).most_common():
    ans += (P1 + P2) * (cnt - 1)

print(ans)
0