Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil
- c,x,y,z,m,s,f,e,t = map(int, input().split())
- fight = ceil((e+1)*f/s)*m + t
- if c>x:
- earn = ceil((ceil((c-x)/z)*y + c)/s)*m
- else:
- earn = ceil(c/s)*m
- print(min(int(fight),int(earn)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement