Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
第二回 ドワンゴからの挑戦状 予選
n = gets.chomp.to_i
puts n / 25
n = gets.chomp.to_i
k = gets.chomp.split(" ").map(&:to_i)
res = []
(n - 2).times do |i|
res << [k[i], k[i + 1]].min
end
res.unshift(k.first)
res.push(k.last)
puts res.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.