結果

問題 No.2766 Delicious Multiply Spice
ユーザー gemmaro
提出日時 2024-06-07 19:07:28
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 164 bytes
コンパイル時間 406 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-12-26 03:31:30
合計ジャッジ時間 5,555 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6 WA * 2
other AC * 10 WA * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
order = +""
while n > 1
  if n.odd?
    order.prepend("A")
    n = (n - 1) / 2
  else
    order.prepend("B")
    n = (n - 1) / 3
  end
end
puts order
0