結果
問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
ユーザー |
![]() |
提出日時 | 2015-09-20 11:28:34 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 62 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 12,160 KB |
最終ジャッジ日時 | 2024-07-19 08:18:42 |
合計ジャッジ時間 | 22,950 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 7 TLE * 3 |
ソースコード
# -*- 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)