結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-05-23 13:04:15
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 351 bytes
コンパイル時間 633 ms
コンパイル使用メモリ 77,936 KB
実行使用メモリ 95,376 KB
最終ジャッジ日時 2023-09-20 10:43:01
合計ジャッジ時間 8,075 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
78,212 KB
testcase_01 AC 90 ms
79,580 KB
testcase_02 AC 78 ms
78,396 KB
testcase_03 AC 91 ms
79,436 KB
testcase_04 AC 365 ms
81,588 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
a = [2, 3, 5, 7, 11, 13]
b = [4, 6, 8, 9, 10, 12]
from itertools import product
from collections import defaultdict
p, c = map(int, raw_input().split())
L = [a] * p + [b] * c
pro1 = defaultdict(int)
for s in product(*L):
    pro1[reduce(lambda a, b: a*b, s)] += 1
res = sum(k*v for k, v in pro1.items())
print float(res) / (6**(p+c))
0