Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. import math
  2. c,x,y,z,m,s,f,e,t = map(int, input().split())
  3. a = math.ceil((e + 1) * f / s) * m + t
  4. if c>x:
  5. n = math.ceil((c - x) / z)
  6. else:
  7. n = 0
  8. b = math.ceil((c+n*y)/s)*m
  9. print(min(a,b))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement