2011-03-09から1日間の記事一覧

この前の解答例

全然最適化とか考えてない実行例。 lines = 0 input = [] # input from standard input while line = STDIN.gets line.chomp! if line != "" if lines == 0 limit = line.to_i else line = line.split(" ") input << [line[0], line[1].to_i] end lines += 1…