結果

問題 No.205 マージして辞書順最小
ユーザー PokerSodatsu
提出日時 2020-01-22 15:48:50
言語 Ruby
(3.4.1)
結果
AC  
実行時間 310 ms / 5,000 ms
コード長 212 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,672 KB
最終ジャッジ日時 2024-07-08 07:00:23
合計ジャッジ時間 3,490 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: assigned but unused variable - item
Syntax OK

ソースコード

diff #

n = gets.to_i
strs = n.times.map{(gets.chomp + '~').chars}
a = ''
flag = true
while flag
  item, i = strs.each_with_index.min
  b = strs[i].shift
  if b != '~'
    a << b
  else
    flag = false
  end
end
puts a
0