結果

問題 No.662 スロットマシーン
ユーザー 330Xs330Xs
提出日時 2022-01-30 17:41:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 79,152 KB
最終ジャッジ日時 2023-09-02 01:42:07
合計ジャッジ時間 4,214 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
71,800 KB
testcase_01 AC 91 ms
71,724 KB
testcase_02 AC 94 ms
71,824 KB
testcase_03 AC 104 ms
72,232 KB
testcase_04 AC 117 ms
77,604 KB
testcase_05 AC 93 ms
71,824 KB
testcase_06 AC 118 ms
77,976 KB
testcase_07 AC 118 ms
77,388 KB
testcase_08 AC 145 ms
79,152 KB
testcase_09 AC 147 ms
78,844 KB
testcase_10 AC 148 ms
78,788 KB
testcase_11 AC 145 ms
78,784 KB
testcase_12 AC 143 ms
78,700 KB
testcase_13 AC 146 ms
78,692 KB
testcase_14 AC 144 ms
78,572 KB
testcase_15 AC 146 ms
78,820 KB
testcase_16 AC 92 ms
71,484 KB
testcase_17 AC 145 ms
78,384 KB
testcase_18 AC 149 ms
78,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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