結果
問題 | No.586 ダブルブッキング |
ユーザー |
|
提出日時 | 2021-07-20 13:45:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 211 bytes |
コンパイル時間 | 227 ms |
コンパイル使用メモリ | 82,520 KB |
実行使用メモリ | 55,432 KB |
最終ジャッジ日時 | 2024-07-17 13:41:32 |
合計ジャッジ時間 | 1,386 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
import collectionsP1 = int(input())P2 = int(input())N = int(input())R = [input() for _ in range(N)]ans = 0for _, cnt in collections.Counter(R).most_common():ans += (P1 + P2) * (cnt - 1)print(ans)