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