結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-20 13:45:16 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 2,000 ms |
| + 99µs | |
| コード長 | 211 bytes |
| 記録 | |
| コンパイル時間 | 215 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 79,648 KB |
| 最終ジャッジ日時 | 2026-08-15 14:39:28 |
| 合計ジャッジ時間 | 1,927 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
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)