Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trip_price = float(input())
- puzzles_count = int(input())
- dolls_count = int(input())
- bears_count = int(input())
- minions_count = int(input())
- trucks_count = int(input())
- profit = (puzzles_count * 2.60) + (dolls_count * 3) + (bears_count * 4.10) \
- + (minions_count * 8.20) + (trucks_count * 2)
- toys_count = puzzles_count + dolls_count + bears_count + minions_count + trucks_count
- #отстъпка
- if toys_count >= 50:
- profit = profit - 0.25 * profit
- #profit = profit * 0.75 -> profit *= 0.75
- # наем
- profit = profit - profit * 0.10
- # profit = profit * 0.9 -> profit *= 0.9
- if profit >= trip_price:
- left_money = profit - trip_price
- print(f'Yes! {left_money:.2f} lv left.')
- else:
- need_money = trip_price - profit
- print(f'Not enough money! {need_money:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment