結果

問題 No.2766 Delicious Multiply Spice
ユーザー june19312june19312
提出日時 2024-05-31 21:34:43
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 337 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 89,328 KB
最終ジャッジ日時 2024-05-31 21:35:02
合計ジャッジ時間 10,070 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
60,420 KB
testcase_01 AC 41 ms
53,228 KB
testcase_02 AC 39 ms
52,192 KB
testcase_03 AC 39 ms
52,624 KB
testcase_04 AC 40 ms
53,412 KB
testcase_05 AC 39 ms
52,400 KB
testcase_06 AC 37 ms
52,068 KB
testcase_07 AC 39 ms
52,068 KB
testcase_08 AC 38 ms
52,284 KB
testcase_09 AC 39 ms
52,688 KB
testcase_10 AC 39 ms
52,564 KB
testcase_11 AC 38 ms
52,956 KB
testcase_12 AC 39 ms
52,956 KB
testcase_13 AC 45 ms
63,220 KB
testcase_14 AC 38 ms
52,804 KB
testcase_15 AC 38 ms
53,012 KB
testcase_16 AC 37 ms
53,228 KB
testcase_17 AC 38 ms
52,520 KB
testcase_18 AC 39 ms
53,824 KB
testcase_19 AC 53 ms
75,280 KB
testcase_20 AC 57 ms
75,328 KB
testcase_21 AC 212 ms
75,496 KB
testcase_22 AC 103 ms
75,264 KB
testcase_23 AC 74 ms
75,220 KB
testcase_24 AC 106 ms
75,280 KB
testcase_25 AC 1,101 ms
78,112 KB
testcase_26 AC 280 ms
75,948 KB
testcase_27 AC 248 ms
75,488 KB
testcase_28 AC 479 ms
76,140 KB
testcase_29 AC 558 ms
76,964 KB
testcase_30 AC 1,477 ms
79,192 KB
testcase_31 TLE -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10**6)
import pypyjit
pypyjit.set_param('max_unroll_recursion=-1')

N = int(input())

def dfs(x,y):
    if x >= N:
        if x == N:
            print("".join(y))
            exit()
        return
    y.append("A")
    dfs(x*2+1,y)
    y.pop()
    y.append("B")
    dfs(x*3+1,y)
    y.pop()

dfs(1,[])

0