結果

問題 No.662 スロットマシーン
ユーザー htkbhtkb
提出日時 2018-04-16 05:12:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 464 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 8,928 KB
最終ジャッジ日時 2023-09-09 10:51:43
合計ジャッジ時間 1,902 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
8,740 KB
testcase_01 AC 21 ms
8,720 KB
testcase_02 AC 20 ms
8,704 KB
testcase_03 AC 20 ms
8,544 KB
testcase_04 AC 22 ms
8,760 KB
testcase_05 AC 19 ms
8,736 KB
testcase_06 AC 23 ms
8,704 KB
testcase_07 AC 24 ms
8,704 KB
testcase_08 AC 34 ms
8,860 KB
testcase_09 AC 43 ms
8,892 KB
testcase_10 AC 41 ms
8,840 KB
testcase_11 AC 42 ms
8,928 KB
testcase_12 AC 43 ms
8,748 KB
testcase_13 AC 42 ms
8,840 KB
testcase_14 AC 42 ms
8,916 KB
testcase_15 AC 42 ms
8,892 KB
testcase_16 AC 19 ms
8,696 KB
testcase_17 AC 42 ms
8,748 KB
testcase_18 AC 41 ms
8,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import functools
import operator
symbols = [(name, int(coin)) for _ in [0]*5 for name, coin in (input().split(),)]
reels = [[input() for _ in [0]*int(input())] for _ in [0]*3]
result, total = [0]*5, 0
for i, (name, coin) in enumerate(symbols):
    result[i] = reels[0].count(name)*5 * reels[1].count(name) * reels[2].count(name)
    total += result[i] * coin
print(total / functools.reduce(operator.mul, (len(r) for r in reels)))
print("\n".join(map(str, result)))
0