gets vote = Array.new(6, 0) gets.split.map(&:to_i).each { |i| vote[i - 1] += 1 } puts vote.rindex(vote.max) + 1