Advertisement
Guest User

Untitled

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