Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created April 6, 2019 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/c5051e8b977e0d0157fbd70b2f5940e2 to your computer and use it in GitHub Desktop.
Save whatalnk/c5051e8b977e0d0157fbd70b2f5940e2 to your computer and use it in GitHub Desktop.
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