結果

問題 No.586 ダブルブッキング
ユーザー en-ren-r
提出日時 2017-11-16 10:27:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 481 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 7,992 KB
最終ジャッジ日時 2023-08-16 16:42:57
合計ジャッジ時間 822 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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