結果
問題 |
No.164 ちっちゃくないよ!!
|
ユーザー |
![]() |
提出日時 | 2015-04-02 01:36:44 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-07-03 23:13:41 |
合計ジャッジ時間 | 1,903 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 11 |
コンパイルメッセージ
Syntax OK
ソースコード
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 max_value puts num_list.map{|num| encode(num, max_value+1)}.min end def encode(str, e) str.to_i(e) end end Yukicoder.new