結果
問題 |
No.2766 Delicious Multiply Spice
|
ユーザー |
|
提出日時 | 2024-05-31 21:30:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 82,056 KB |
実行使用メモリ | 56,676 KB |
最終ジャッジ日時 | 2024-12-20 22:30:26 |
合計ジャッジ時間 | 3,364 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 8 |
other | AC * 31 |
ソースコード
S = input R = range P = print def I(): return int(S()) def M(): return map(int, S().split()) def L(): return list(M()) def O(): return list(map(int, open(0).read().split())) def yn(b): print("Yes" if b else "No") biga = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" smaa = "abcdefghijklmnopqrstuvwxyz" from functools import cache @cache def f(n): if n == 1: return "" if n % 2 == 1: d = f(n // 2) if d != None: return d + "A" if n % 3 == 1: d = f(n // 3) if d != None: return d + "B" return None n = I() print(f(n))