結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー titiatitia
提出日時 2022-06-30 02:36:15
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 288 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 75,728 KB
最終ジャッジ日時 2024-05-02 22:58:07
合計ジャッジ時間 7,059 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,928 KB
testcase_01 AC 37 ms
60,032 KB
testcase_02 AC 32 ms
51,712 KB
testcase_03 AC 38 ms
60,032 KB
testcase_04 AC 251 ms
75,728 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

P,C=map(int,input().split())

X=[2,3,5,7,11,13]
Y=[4,6,8,9,10,12]

from itertools import product

ANS=0
for l in product(range(6),repeat=P+C):
    sc=1
    for i in range(P+C):

        if i<P:
            sc*=X[l[i]]
        else:
            sc*=Y[l[i]]
    ANS+=sc

print(ANS/6**(P+C))
0