結果

問題 No.2766 Delicious Multiply Spice
ユーザー Abhishek ChoudharyAbhishek Choudhary
提出日時 2024-05-31 23:13:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 53,812 KB
最終ジャッジ日時 2024-05-31 23:13:36
合計ジャッジ時間 3,054 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,388 KB
testcase_01 AC 40 ms
53,184 KB
testcase_02 AC 41 ms
53,316 KB
testcase_03 AC 40 ms
52,768 KB
testcase_04 AC 40 ms
52,648 KB
testcase_05 AC 40 ms
52,404 KB
testcase_06 AC 40 ms
51,940 KB
testcase_07 AC 40 ms
52,132 KB
testcase_08 AC 40 ms
52,132 KB
testcase_09 AC 39 ms
52,584 KB
testcase_10 AC 39 ms
52,860 KB
testcase_11 AC 39 ms
53,720 KB
testcase_12 AC 39 ms
52,828 KB
testcase_13 AC 39 ms
53,220 KB
testcase_14 AC 40 ms
53,460 KB
testcase_15 AC 39 ms
52,332 KB
testcase_16 AC 39 ms
52,896 KB
testcase_17 AC 39 ms
52,024 KB
testcase_18 AC 39 ms
52,616 KB
testcase_19 AC 39 ms
52,004 KB
testcase_20 AC 39 ms
53,192 KB
testcase_21 AC 40 ms
51,940 KB
testcase_22 AC 40 ms
52,464 KB
testcase_23 AC 40 ms
52,416 KB
testcase_24 AC 40 ms
53,812 KB
testcase_25 AC 39 ms
53,420 KB
testcase_26 AC 40 ms
52,456 KB
testcase_27 AC 39 ms
52,556 KB
testcase_28 AC 39 ms
53,424 KB
testcase_29 AC 40 ms
52,404 KB
testcase_30 AC 40 ms
53,808 KB
testcase_31 AC 39 ms
53,484 KB
testcase_32 AC 39 ms
52,756 KB
testcase_33 AC 40 ms
53,412 KB
testcase_34 AC 41 ms
52,200 KB
testcase_35 AC 39 ms
52,812 KB
testcase_36 AC 39 ms
52,812 KB
testcase_37 AC 39 ms
52,748 KB
testcase_38 AC 40 ms
53,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

def get(n):
    if n < 1:
        return None
    if n == 1:
        return ''
    if (n - 1) % 2 == 0:
        curr = get((n - 1) // 2)
        if curr != None:
            return curr + 'A'
    if (n - 1) % 3 == 0:
        curr = get((n - 1) // 3)
        if curr != None:
            return curr + 'B'
    return None

print(get(n) or '')
0