結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
n_knuu
|
| 提出日時 | 2015-05-22 22:41:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 656 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 94,080 KB |
| 最終ジャッジ日時 | 2024-07-06 05:15:12 |
| 合計ジャッジ時間 | 7,363 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 4 |
ソースコード
from functools import reduce
from operator import mul
from itertools import product, permutations, combinations, accumulate, cycle, combinations_with_replacement
from string import ascii_uppercase, ascii_lowercase, ascii_letters, digits, hexdigits, octdigits
prod = lambda l: reduce(mul, l, 1)
prodmod = lambda l, mod: reduce(lambda x, y: mul(x,y)%mod, l)
P, C = map(int, input().split())
saikoro = {}
for i in product([2,3,5,7,11,13], repeat=P):
for j in product([4,6,8,9,10,12], repeat=C):
p = prod(i)*prod(j)
saikoro[p] = saikoro.get(p, 0) + 1
ans = 0
for key, cnt in saikoro.items():
ans += key * cnt / (6**(P+C))
print(ans)
n_knuu