Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command = input()
- count_days = 1
- climbed_meters = 5364
- is_failed = False
- while command != "END":
- sleep = command
- meters_per_day = int(input())
- if sleep == "Yes":
- count_days += 1
- if count_days <= 5:
- climbed_meters += meters_per_day
- else:
- is_failed = True
- break
- elif sleep == "No":
- climbed_meters += meters_per_day
- if climbed_meters >= 8848:
- break
- command = input()
- if command == "END" or is_failed:
- print("Failed!")
- print(climbed_meters)
- else:
- print(f"Goal reached for {count_days} days!")
Advertisement
Add Comment
Please, Sign In to add comment