結果
問題 |
No.2766 Delicious Multiply Spice
|
ユーザー |
|
提出日時 | 2024-05-31 21:30:20 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 453 ms |
コンパイル使用メモリ | 81,976 KB |
実行使用メモリ | 66,808 KB |
最終ジャッジ日時 | 2024-12-20 22:30:20 |
合計ジャッジ時間 | 4,480 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 6 |
other | RE * 31 |
ソースコード
import sys sys.setrecursionlimit(10**8) n=int(input()) S=set() ans=[] def f(x): global S,ans if x==1: print("".join(ans)[::-1]) exit() if x not in S: S.add() if (x-1)%2==0: ans.append("A") f((x-1)//2) ans.pop() if (x-1)%3==0: ans.append("B") f((x-1)//3) ans.pop() f(n)