結果

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

テストケース

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

ソースコード

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 c:
    if c[hotel] >= 2:
        a = c[hotel] - 1
        price += (a* yuki_Hotel) + (a * next_Hotel)
print(price)
0