Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trunk_capacity = float(input())
- suitcase_counter = 0
- loaded_suitcases = 0
- line = input()
- while line != "End":
- suitcase = float(line)
- suitcase_counter += 1
- if suitcase_counter % 3 == 0:
- trunk_capacity -= suitcase * 1.10
- else:
- trunk_capacity -= suitcase
- if trunk_capacity < 0:
- print("No more space!")
- break
- else:
- loaded_suitcases += 1
- line = input()
- if trunk_capacity == 0 or line == "End":
- print("Congratulations! All suitcases are loaded!")
- print(f"Statistic: {loaded_suitcases} suitcases loaded.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement