結果

問題 No.2766 Delicious Multiply Spice
ユーザー aa
提出日時 2024-05-31 21:35:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,580 KB
実行使用メモリ 54,100 KB
最終ジャッジ日時 2024-05-31 21:35:15
合計ジャッジ時間 2,910 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,824 KB
testcase_01 AC 38 ms
52,676 KB
testcase_02 AC 37 ms
53,072 KB
testcase_03 AC 38 ms
53,756 KB
testcase_04 AC 38 ms
52,224 KB
testcase_05 AC 38 ms
52,880 KB
testcase_06 AC 38 ms
53,476 KB
testcase_07 AC 38 ms
52,888 KB
testcase_08 AC 39 ms
53,084 KB
testcase_09 AC 37 ms
52,396 KB
testcase_10 AC 39 ms
52,692 KB
testcase_11 AC 39 ms
52,572 KB
testcase_12 AC 39 ms
52,560 KB
testcase_13 AC 38 ms
52,948 KB
testcase_14 AC 39 ms
52,872 KB
testcase_15 AC 39 ms
52,292 KB
testcase_16 AC 39 ms
52,344 KB
testcase_17 AC 39 ms
53,196 KB
testcase_18 AC 38 ms
51,996 KB
testcase_19 AC 40 ms
52,276 KB
testcase_20 AC 39 ms
53,492 KB
testcase_21 AC 39 ms
53,148 KB
testcase_22 AC 38 ms
52,028 KB
testcase_23 AC 40 ms
52,332 KB
testcase_24 AC 38 ms
52,396 KB
testcase_25 AC 38 ms
54,100 KB
testcase_26 AC 39 ms
52,528 KB
testcase_27 AC 39 ms
52,532 KB
testcase_28 AC 39 ms
52,744 KB
testcase_29 AC 38 ms
52,888 KB
testcase_30 AC 38 ms
52,872 KB
testcase_31 AC 40 ms
53,000 KB
testcase_32 AC 38 ms
52,072 KB
testcase_33 AC 38 ms
53,160 KB
testcase_34 AC 39 ms
52,544 KB
testcase_35 AC 39 ms
53,368 KB
testcase_36 AC 38 ms
52,400 KB
testcase_37 AC 39 ms
53,728 KB
testcase_38 AC 38 ms
52,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
def saiki(n,s):
    if n==1:
        print(''.join(map(str,s[::-1])))
        exit()
    if n%2==1:
        saiki(n//2,s+['A'])
    if n%3==1:
        saiki(n//3,s+['B'])
saiki(n,[])
0