結果

問題 No.662 スロットマシーン
ユーザー syunsukesyunsuke
提出日時 2018-06-21 22:05:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 1,207 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 8,420 KB
最終ジャッジ日時 2023-09-13 07:40:52
合計ジャッジ時間 1,716 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,140 KB
testcase_01 AC 16 ms
8,076 KB
testcase_02 AC 17 ms
8,008 KB
testcase_03 AC 17 ms
8,044 KB
testcase_04 AC 20 ms
8,140 KB
testcase_05 AC 17 ms
8,172 KB
testcase_06 AC 21 ms
8,072 KB
testcase_07 AC 21 ms
8,140 KB
testcase_08 AC 31 ms
8,420 KB
testcase_09 AC 42 ms
8,064 KB
testcase_10 AC 41 ms
8,140 KB
testcase_11 AC 41 ms
8,056 KB
testcase_12 AC 41 ms
8,068 KB
testcase_13 AC 41 ms
8,072 KB
testcase_14 AC 40 ms
8,076 KB
testcase_15 AC 41 ms
7,992 KB
testcase_16 AC 16 ms
8,064 KB
testcase_17 AC 40 ms
8,204 KB
testcase_18 AC 41 ms
7,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

list0=[]
for i in range(5):
    line=input()
    line=line.rstrip().split(" ")
    a=[line[0],int(line[1])]
    list0.append(a)
    
#print(list0)

N1=int(input())
L1=[]
for j in range(N1):
    a=input()
    L1.append(a)
#print(L1)

N2=int(input())
L2=[]
for j in range(N2):
    a=input()
    L2.append(a)
#print(L2)

N3=int(input())
L3=[]
for j in range(N3):
    a=input()
    L3.append(a)
#print(L3)

E1=list0[0][0]
E2=list0[1][0]
E3=list0[2][0]
E4=list0[3][0]
E5=list0[4][0]
LE1=[L1.count(E1),L2.count(E1),L3.count(E1)]
LE2=[L1.count(E2),L2.count(E2),L3.count(E2)]
LE3=[L1.count(E3),L2.count(E3),L3.count(E3)]
LE4=[L1.count(E4),L2.count(E4),L3.count(E4)]
LE5=[L1.count(E5),L2.count(E5),L3.count(E5)]

LE1S=LE1[0]*LE1[1]*LE1[2]/len(L1)/len(L2)/len(L3)*5*list0[0][1]
LE2S=LE2[0]*LE2[1]*LE2[2]/len(L1)/len(L2)/len(L3)*5*list0[1][1]
LE3S=LE3[0]*LE3[1]*LE3[2]/len(L1)/len(L2)/len(L3)*5*list0[2][1]
LE4S=LE4[0]*LE4[1]*LE4[2]/len(L1)/len(L2)/len(L3)*5*list0[3][1]
LE5S=LE5[0]*LE5[1]*LE5[2]/len(L1)/len(L2)/len(L3)*5*list0[4][1]

print(LE1S+LE2S+LE3S+LE4S+LE5S)
print(LE1[0]*LE1[1]*LE1[2]*5)
print(LE2[0]*LE2[1]*LE2[2]*5)
print(LE3[0]*LE3[1]*LE3[2]*5)
print(LE4[0]*LE4[1]*LE4[2]*5)
print(LE5[0]*LE5[1]*LE5[2]*5)
0