結果

問題 No.586 ダブルブッキング
ユーザー Nisshy_24Nisshy_24
提出日時 2018-04-19 19:07:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 8,644 KB
最終ジャッジ日時 2023-09-09 11:46:54
合計ジャッジ時間 898 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import collections

yuki_Hotel = int(input())
next_Hotel = int(input())
n = int(input())
Hotels = []
price = 0

for count in range(n):
    list = input()
    Hotels.append(list)

c = collections.Counter(Hotels)
for hotel in Hotels:
    if c[hotel] >= 2:
        price += (c[hotel] * yuki_Hotel) + (c[hotel] * next_Hotel)
print(price)
0