結果

問題 No.164 ちっちゃくないよ!!
ユーザー siman
提出日時 2015-04-02 01:37:11
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-07-03 23:13:43
合計ジャッジ時間 1,513 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class Yukicoder
  LIST = [*('0'..'9')] + [*('A'..'Z')]

  def initialize
    n = gets.chomp.to_i
    num_list = []
    max_value = 0

    n.times do
      str = gets.chomp
      num_list << str

      max_value = [max_value, str.chars.map{|ch| LIST.index(ch)}.max].max
    end

    puts num_list.map{|num| encode(num, max_value+1)}.min
  end

  def encode(str, e)
    str.to_i(e)
  end
end

Yukicoder.new
0