Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rzutka():
- range = input().split(" ")
- x = int(range[0])
- y = int(range[1])
- throwsNumber = int(input())
- throws = input().split(" ")
- points = 0
- i = 0
- while i < throwsNumber:
- throw = int(throws[i])
- if throw >= x and throw <=y:
- points = 0
- elif throw < x:
- points += x - throw
- elif throw > y:
- points += throw - y
- i += 1
- print(points)
- rzutka()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement