結果
| 問題 | No.212 素数サイコロと合成数サイコロ (2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-23 13:13:07 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 76,720 KB |
| 実行使用メモリ | 168,264 KB |
| 最終ジャッジ日時 | 2024-07-06 06:15:17 |
| 合計ジャッジ時間 | 7,404 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 4 |
ソースコード
#!/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))