Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- needed_sum = float(input())
- drink = input()
- profit = 0
- while drink != 'Party!':
- sum = len(drink) * float(input())
- if sum % 2 == 1:
- sum *= 0.75
- profit += sum
- if profit >= needed_sum:
- break
- drink = input()
- if needed_sum > profit:
- print(f'We need {needed_sum - profit:.2f} leva more.')
- else:
- print('Target acquired.')
- print(f'Club income - {profit:.2f} leva.')
Add Comment
Please, Sign In to add comment