Advertisement
1nikitas

Untitled

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