Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- N = int(input())
- M = int(input())
- P = int(input())
- graphics_price = 250
- processor_price = 0.35*graphics_price*N
- RAM_price = 0.1*graphics_price*N
- total_price = N*graphics_price + M*processor_price + P*RAM_price
- if N > M:
- total_price *= 0.85
- if budget > total_price:
- diff = budget - total_price
- print(f"You have {diff:.2f} leva left!")
- else:
- diff = total_price - budget
- print(f"Not enough money! You need {diff:.2f} leva more!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement