結果

問題 No.662 スロットマシーン
ユーザー takeytakey
提出日時 2018-03-09 23:25:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-19 03:01:58
合計ジャッジ時間 1,968 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 31 ms
10,624 KB
testcase_03 AC 32 ms
10,624 KB
testcase_04 AC 32 ms
10,624 KB
testcase_05 AC 32 ms
10,624 KB
testcase_06 AC 37 ms
10,624 KB
testcase_07 AC 37 ms
10,624 KB
testcase_08 AC 47 ms
10,624 KB
testcase_09 AC 61 ms
10,752 KB
testcase_10 AC 61 ms
10,752 KB
testcase_11 AC 61 ms
10,624 KB
testcase_12 AC 58 ms
10,752 KB
testcase_13 AC 56 ms
10,752 KB
testcase_14 AC 59 ms
10,752 KB
testcase_15 AC 58 ms
10,880 KB
testcase_16 AC 31 ms
10,624 KB
testcase_17 AC 59 ms
10,752 KB
testcase_18 AC 58 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-

if __name__ == "__main__":
    strs = {}
    for i in range(5):
        str_, coin = input().split()
        strs[str_] = int(coin)
    n1 = int(input())
    A = [input() for i in range(n1)]
    n2 = int(input())
    B = [input() for i in range(n2)]
    n3 = int(input())
    C = [input() for i in range(n3)]
    # 期待値計算
    U = {}
    all_ways = n1*n2*n3
    kitai = 0
    for egara in strs:
        U[egara] = A.count(egara) * B.count(egara) * C.count(egara) * 5
        kitai += (U[egara] / all_ways) * strs[egara]
    # 出力
    print(kitai)
    for egara in U:
        print(U[egara])
0