結果

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

ソースコード

diff #

from collections import Counter

P = [int(input()) for _ in range(2)]
N = int(input())
c = Counter(int(input()) for _ in range(N))

ans = sum(v - 1 if v >= 2 else 0 for v in c.values()) * sum(P)

print(ans)
0