結果
| 問題 |
No.586 ダブルブッキング
|
| コンテスト | |
| ユーザー |
Nisshy_24
|
| 提出日時 | 2018-04-19 19:13:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 2,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-27 04:52:29 |
| 合計ジャッジ時間 | 928 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
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)
Nisshy_24