Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numbers = int(input())
- nots = 0
- jumps = 0
- jump_practice = 0
- num = numbers
- start_high = numbers - 30
- while num >= start_high:
- jump_practice = int(input())
- jumps += 1
- if jump_practice > start_high:
- if jump_practice >= num:
- break
- start_high += 5
- nots = 0
- elif jump_practice <= start_high:
- nots += 1
- if nots == 3:
- print(f'Tihomir failed at {start_high}cm after {jumps} jumps.')
- break
- if jump_practice >= numbers:
- print(f'Tihomir succeeded, he jumped over {start_high}cm after {jumps} jumps.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement