結果
問題 | No.586 ダブルブッキング |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:05:57 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 268 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 82,396 KB |
実行使用メモリ | 55,372 KB |
最終ジャッジ日時 | 2025-03-20 21:06:02 |
合計ジャッジ時間 | 975 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
P1 = int(input()) P2 = int(input()) N = int(input()) rooms = [input().strip() for _ in range(N)] from collections import Counter counts = Counter(rooms) total_transfers = sum(v - 1 for v in counts.values()) total_loss = total_transfers * (P1 + P2) print(total_loss)