Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = list(map(int, input().split()))
- x = int(input()) #индекс первого >= x
- l = -1
- r = len(a)
- while r - l > 1:
- m = (r + l) // 2
- if a[m] < x:
- l = m
- else:
- r = m
- print(r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement