Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a, b, c, x, y = map(int, input().split(' '))
- min_price = 100000 * 3 * 5000
- for pizza_c in range(max(x, y) * 2 + 1):
- pizza_a = max(x - int(pizza_c / 2), 0)
- pizza_b = max(y - int(pizza_c / 2), 0)
- min_price = min(pizza_a * a + pizza_b * b + pizza_c * c, min_price)
- print(min_price)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement