結果

問題 No.212 素数サイコロと合成数サイコロ (2)
コンテスト
ユーザー yuppe19 😺
提出日時 2015-05-23 13:13:07
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 4,533 ms / 5,000 ms
+ 147µs
コード長 363 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,977 ms
コンパイル使用メモリ 80,768 KB
実行使用メモリ 99,584 KB
最終ジャッジ日時 2026-08-09 04:10:08
合計ジャッジ時間 8,144 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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