結果

問題 No.662 スロットマシーン
ユーザー dangodango
提出日時 2023-06-13 16:11:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 376 bytes
コンパイル時間 1,030 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 77,632 KB
最終ジャッジ日時 2023-09-04 01:21:52
合計ジャッジ時間 3,980 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,160 KB
testcase_01 AC 76 ms
71,216 KB
testcase_02 AC 76 ms
71,144 KB
testcase_03 AC 82 ms
71,324 KB
testcase_04 AC 104 ms
76,592 KB
testcase_05 AC 78 ms
71,136 KB
testcase_06 AC 95 ms
76,732 KB
testcase_07 AC 92 ms
76,240 KB
testcase_08 AC 118 ms
77,564 KB
testcase_09 AC 118 ms
77,632 KB
testcase_10 AC 116 ms
77,420 KB
testcase_11 AC 117 ms
77,568 KB
testcase_12 AC 116 ms
77,568 KB
testcase_13 AC 117 ms
77,564 KB
testcase_14 AC 117 ms
77,416 KB
testcase_15 AC 118 ms
77,348 KB
testcase_16 AC 74 ms
71,152 KB
testcase_17 AC 115 ms
77,384 KB
testcase_18 AC 117 ms
77,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = {}
for _ in range(5):
    A, B = input().split()
    D[A] = int(B)
NUM = {K:5 for K in D}
T = 1
for _ in range(3):
    N = int(input())
    T *= N
    DD = {K:0 for K in D}
    for __ in range(N):
        DD[input()] += 1
    for K, V in DD.items():
        NUM[K] *= V
RE = 0
for K, V in NUM.items():
    RE += D[K] * V
print(RE / T)
for K, V in NUM.items():
    print(V)
0