Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c, x, y, z, m, s, f, e, t = map(int, input().split())
- hoho = 0
- hehe = 0
- hihi = 0
- if c <= x:
- if c % s == 0:
- hoho = m * (c // s)
- else:
- hoho = (m * (c // s)) + m
- print(hoho)
- elif c > x:
- haha = 0
- if (c - x) % z == 0:
- haha = y * ((c - x) // z)
- huhu = c + haha
- if huhu % s == 0:
- hehe = (huhu // s) * m
- else:
- hehe = ((huhu // s) * m) + m
- else:
- haha = (y * ((c - x) // z)) + y
- huhu = c + haha
- if huhu % s == 0:
- hehe = (huhu // s) * m
- else:
- hehe = ((huhu // s) * m) + m
- hyhy = (e + 1) * f
- if hyhy % s == 0:
- hihi = (hyhy // s) * m + t
- else:
- hihi = ((hyhy // s) * m) + m + t
- print(min(hehe, hihi))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement