結果

問題 No.212 素数サイコロと合成数サイコロ (2)
コンテスト
ユーザー koyopro
提出日時 2015-09-20 11:28:34
言語 PyPy2
(7.3.20)
結果
WA  
実行時間 -
コード長 369 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 138 ms
コンパイル使用メモリ 77,564 KB
最終ジャッジ日時 2025-12-03 17:08:34
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# -*- coding: utf-8 -*-

import random

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

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

total = 0
num = 1000000

for i in xrange(num):
    add = 1
    for p in xrange(P):
        add *= random.choice(primes)
    for c in xrange(C):
        add *= random.choice(composite)
    total += add

print "%.9f" % (1.0 * total / num)
0