Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trunk = float(input())
- line = input()
- counter = 0
- has_space = True
- while line != 'End':
- vol = float(line)
- if trunk <= vol:
- has_space = False
- break
- trunk -= vol
- counter += 1
- if counter % 3 == 0:
- trunk -= vol * 0.1
- if trunk < 0:
- has_space = False
- counter -= 1
- break
- line = input()
- if not has_space:
- print(f'No more space!')
- if has_space:
- print(f'Congratulations! All suitcases are loaded!')
- print(f'Statistic: {counter} suitcases loaded.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement