結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー roiti46roiti46
提出日時 2015-05-22 22:25:04
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 349 bytes
コンパイル時間 1,572 ms
コンパイル使用メモリ 77,328 KB
実行使用メモリ 85,160 KB
最終ジャッジ日時 2023-09-20 09:23:24
合計ジャッジ時間 8,893 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
76,324 KB
testcase_01 AC 100 ms
79,452 KB
testcase_02 AC 72 ms
76,576 KB
testcase_03 AC 87 ms
79,432 KB
testcase_04 AC 775 ms
79,960 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as it
def calc(a):
    res = 1
    for i in a:
        res *= i
    return res
    
P, C = map(int, raw_input().split())
p = [2,3,5,7,11,13]
n = [4,6,8,9,10,12]

ans = 0.0
for pp in it.product(p, repeat = P):
    for nn in it.product(n, repeat = C):
        ans += 1.0 * calc(pp) * calc(nn) / (6.0 ** P * 6.0 ** C)
print "%.10f"%ans
0