結果
| 問題 | No.586 ダブルブッキング | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-02-23 11:09:10 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 38 ms / 2,000 ms | 
| コード長 | 179 bytes | 
| コンパイル時間 | 273 ms | 
| コンパイル使用メモリ | 82,276 KB | 
| 実行使用メモリ | 54,044 KB | 
| 最終ジャッジ日時 | 2024-09-22 07:09:05 | 
| 合計ジャッジ時間 | 1,173 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
P1 = int(input())
P2 = int(input())
N = int(input())
R = [int(input()) for i in range(N)]
ans = 0
for i in range(1, 1000):
    ans += max(0, R.count(i) - 1) * (P1 + P2)
print(ans)
            
            
            
        