結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー DrDrpilotDrDrpilot
提出日時 2022-01-28 16:08:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 287 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 8,008 KB
最終ジャッジ日時 2023-08-28 13:20:40
合計ジャッジ時間 7,658 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,952 KB
testcase_01 AC 18 ms
7,852 KB
testcase_02 AC 16 ms
7,860 KB
testcase_03 AC 16 ms
8,008 KB
testcase_04 AC 385 ms
7,844 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

p,c=map(int,input().split())
def dfs(cnt,now):
    if cnt==p+c:
        return now
    tmp=0
    if cnt<p:
        for i in [2,3,5,7,11,13]:
            tmp+=dfs(cnt+1,now*i/6)
    else:
        for j in [4,6,8,9,10,12]:
            tmp+=dfs(cnt+1,now*j/6)
    return tmp
print(dfs(0,1))
0