Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- capacity_luggage = float(input())
- input_line = input()
- counter = 0
- is_full = False
- while input_line != "End":
- counter += 1
- volume = float(input_line)
- if counter % 3 == 0:
- volume = volume * 1.1
- if volume > capacity_luggage:
- is_full = True
- counter -= 1
- break
- else:
- capacity_luggage -= volume
- input_line = input()
- if is_full:
- print(f"No more space!")
- else:
- print(f"Congratulations! All suitcases are loaded!")
- print(f"Statistic: {counter} suitcases loaded.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement