Advertisement
Guest User

Untitled

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