結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー titiatitia
提出日時 2022-06-30 02:35:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 288 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-02 22:57:42
合計ジャッジ時間 10,684 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,752 KB
testcase_01 AC 42 ms
10,624 KB
testcase_02 AC 31 ms
10,496 KB
testcase_03 AC 45 ms
10,624 KB
testcase_04 AC 3,801 ms
10,496 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