Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. goal_jump = int(input())
  2.  
  3. stick_high  = goal_jump - 30
  4. current_jump = 0
  5. count_jump = 0
  6. while goal_jump != stick_high:
  7.     current_jump = int(input())
  8.     count_jump = 0
  9.     max_jumps = 3
  10.     if stick_high < current_jump:
  11.         stick_high += 5
  12.         count_jump += 1
  13.     elif stick_high > current_jump:
  14.         max_jumps -= 1
  15.         count_jump += 1
  16.  
  17. if stick_high < current_jump:
  18.     print(f"{stick_high} and {count_jump}")
  19.  
  20. else:
  21.     print(f"{stick_high} and {count_jump}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement