結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-07 17:12:34 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-04-04 17:35:08 |
| 合計ジャッジ時間 | 1,078 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
P1 = int(input())
P2 = int(input())
N = int(input())
R = [int(input()) for _ in range(N)]
room = [0]*1000
for r in R:
room[r-1] += 1
cnt = 0
for i in range(1000):
if room[i] > 1:
cnt += room[i]-1
print(cnt*(P1+P2))