Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- magnolia = int(input())
- hyacinth = int(input())
- rose = int(input())
- cactus = int(input())
- gift = float(input())
- total = (magnolia * 3.25 + hyacinth * 4 + rose * 3.5 + cactus * 8) * 0.95
- if total >= gift:
- print(f'She is left with {math.floor(total - gift)} leva.')
- else:
- print(f'She will have to borrow {math.ceil(gift - total)} leva.')
- Taрикатско решение:)
- import math
- total = (int(input()) * 3.25 + int(input()) * 4 + int(input()) * 3.5 + int(input()) * 8) * 0.95
- if total >= float(input()):
- print(f'She is left with {math.floor(total - float(input()))} leva.')
- else:
- print(f'She will have to borrow {math.ceil(float(input()) - total)} leva.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement