Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- saved_money = 0
- travel_expences = 0
- while True:
- destination = input()
- if destination == "End":
- break
- expences = int(input())
- while travel_expences <= expences:
- saved_money = int(input())
- travel_expences += saved_money
- if travel_expences >= expences:
- print(f"Going to {destination}!")
- travel_expences = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement