Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import math
  2.  
  3. c, x, y, z, m, s, f, e, t = [int(i) for i in input().split()]
  4.  
  5. if c <= x:
  6. time_kop = m*math.ceil(c/s)
  7. else:
  8. kol_hr = math.ceil((c - x) / z)
  9. ost = s * math.ceil(kol_hr * y / s) - kol_hr * y
  10. t_hr = (math.ceil(kol_hr * y / s)) * m
  11. time_kop = t_hr + math.ceil((c - ost) / s) * m
  12.  
  13. tr = 0
  14. cred_ost = 0
  15. k = math.floor(((e+1)*f)/s)+1
  16. t_tr = t + m*k
  17. if time_kop < t_tr:
  18. print(time_kop)
  19. else:
  20. print(t_tr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement