input = gets.split(" ") input.map!{|i| i.to_i} input.sort! input.delete_at(0) input.delete_at(-1) sum = 0 input.each do |j| sum += j end a = (sum.to_f / input.size).round(2).to_s# your code goes here puts sprintf("%.2f",a)