結果

問題 No.327 アルファベット列
ユーザー siman
提出日時 2016-03-23 07:50:08
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-10-01 19:27:09
合計ジャッジ時間 5,722 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 47
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class Yukicoder
  def initialize
    n = gets.to_i
    answer = ""

    while (answer.empty? && n > 25) || n > 26
      i = n % 26
      n /= 26
      answer += (i+10).to_s(36).upcase
    end

    if answer.empty?
      answer += (n+10).to_s(36).upcase
    else
      answer += (n+9).to_s(36).upcase
    end

    puts answer.reverse
  end
end

Yukicoder.new
0