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