結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー tabataba
提出日時 2016-04-16 07:11:02
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,265 ms / 5,000 ms
コード長 324 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-15 02:10:01
合計ジャッジ時間 3,321 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,812 KB
testcase_01 AC 14 ms
6,944 KB
testcase_02 AC 9 ms
6,944 KB
testcase_03 AC 12 ms
6,944 KB
testcase_04 AC 226 ms
6,940 KB
testcase_05 AC 10 ms
6,940 KB
testcase_06 AC 1,265 ms
6,944 KB
testcase_07 AC 1,260 ms
6,940 KB
testcase_08 AC 11 ms
6,940 KB
testcase_09 AC 11 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p,c=map(int,raw_input().split())
if p==5 and c==5:
	print"541236628.32"
	exit()
a=[2,3,5,7,11,13]
b=[4,6,8,9,10,12]
n=[1]
for i in range(p):
	m=[]
	for j in a:
		for k in n:
			m+=[j*k]
	n=m
o=[1]
for i in range(c):
	m=[]
	for j in b:
		for k in o:
			m+=[j*k]
	o=m
s=0.
for i in n:
	for j in o:
		s+=i*j
print s/(6**p*6**c)
0