結果

問題 No.586 ダブルブッキング
ユーザー en-r
提出日時 2017-11-16 10:22:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 486 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-25 06:13:44
合計ジャッジ時間 936 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

Yukiprice = int(input())
otherprice = int(input())
N = int(input())
room_numbers = []
deadcount = 0


for i in range(N):
    room_numbers.append(int(input())) 
    
#リスト内を昇順ソート
sorted(room_numbers)
#print(room_numbers[2])

#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)
0