Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- goal_jump = int(input())
- stick_high = goal_jump - 30
- current_jump = 0
- count_jump = 0
- while goal_jump != stick_high:
- current_jump = int(input())
- count_jump = 0
- max_jumps = 3
- if stick_high < current_jump:
- stick_high += 5
- count_jump += 1
- elif stick_high > current_jump:
- max_jumps -= 1
- count_jump += 1
- if stick_high < current_jump:
- print(f"{stick_high} and {count_jump}")
- else:
- print(f"{stick_high} and {count_jump}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement