Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AtCoder ABC #123 C - Five Transportations
n = gets.chomp.to_i
a = []
5.times do
a << gets.chomp.to_i
end
amin = a.min
r = n % amin
g = n / amin
g += 1 if r > 0
puts 5 + g - 1
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.