結果
| 問題 |
No.2766 Delicious Multiply Spice
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-23 16:07:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 276 bytes |
| コンパイル時間 | 546 ms |
| コンパイル使用メモリ | 81,984 KB |
| 実行使用メモリ | 53,828 KB |
| 最終ジャッジ日時 | 2025-05-23 16:07:20 |
| 合計ジャッジ時間 | 3,409 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 8 |
| other | AC * 31 |
ソースコード
n = int(input())
def f(x):
if x == 1:
return ''
if x % 2 == 1:
y = f(x//2)
if y is not None:
return y + 'A'
if x % 3 == 1:
y = f(x//3)
if y is not None:
return y + 'B'
return None
print(f(n))