Advertisement
mark79

Everest

May 12th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. top = 8848
  2. progress = 5364
  3. daysCount = 1
  4.  
  5. while progress < top and daysCount < 6:
  6.     symbol = input()
  7.     if symbol == "END":
  8.         break
  9.     if symbol == "Yes":
  10.         daysCount += 1
  11.     distance = int(input())
  12.     if daysCount < 6:
  13.         progress += distance
  14.  
  15. if progress >= top:
  16.     print(f"Goal reached for {daysCount} days!")
  17. else:
  18.     print("Failed!")
  19.     print(progress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement