結果

問題 No.662 スロットマシーン
コンテスト
ユーザー 330Xs
提出日時 2022-01-30 17:41:57
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 626 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 158 ms
コンパイル使用メモリ 85,940 KB
実行使用メモリ 82,300 KB
最終ジャッジ日時 2026-03-04 10:27:10
合計ジャッジ時間 1,894 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import Counter
lis = []
for _ in range(5):
    l = list(map(str,input().split()))
    lis.append(l)

n1 = int(input())
r1 = []
for _ in range(n1):
    r1.append(input())
r1 = Counter(r1)

n2 = int(input())
r2 = []
for _ in range(n2):
    r2.append(input())
r2 = Counter(r2)

n3 = int(input())
r3 = []
for _ in range(n3):
    r3.append(input())
r3 = Counter(r3)

each_cnt = []
for i in range(5):
    ans = 5*r1[lis[i][0]]*r2[lis[i][0]]*r3[lis[i][0]]
    each_cnt.append(ans)

ex = 0
for i in range(5):
    ex += each_cnt[i] * int(lis[i][1])

print(ex / (n1 * n2 * n3))
for i in range(5):
    print(each_cnt[i])
0