結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-16 10:28:07 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| コード長 | 482 bytes |
| 記録 | |
| コンパイル時間 | 496 ms |
| コンパイル使用メモリ | 20,552 KB |
| 実行使用メモリ | 15,356 KB |
| 最終ジャッジ日時 | 2026-05-19 16:36:40 |
| 合計ジャッジ時間 | 2,103 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
Yukiprice = int(input())
otherprice = int(input())
N = int(input())
room_numbers = []
deadcount = 0
for i in range(N):
room_numbers.append(int(input()))
#リスト内を昇順ソート
room_numbers.sort()
#print(room_numbers)
#n = n+1 なら損出計算
n = 0
for i in range(N-1):
if room_numbers[n] == room_numbers[n+1]:
deadcount += 1
n += 1
#損出の合算
lose_sum = deadcount*(Yukiprice + otherprice)
#print(deadcount)
print(lose_sum)