Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
бинарный поиск
nq1s788
Apr 16th, 2024
120
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.23 KB
| None
|
0
0
raw
download
clone
embed
print
report
a
=
list
(
map
(
int
,
input
(
)
.
split
(
)
)
)
#[2, 5, 7, 9]
x
=
int
(
input
(
)
)
#индекс первого, >= x
l
=
-
1
r
=
len
(
a
)
while
r - l
>
1
:
m
=
(
l + r
)
//
2
if
a
[
m
]
>=
x:
r
=
m
else
:
l
=
m
print
(
r
)
Add Comment
Please,
Sign In
to add comment
Public Pastes
Your Bitcoin Wallet Credentials have been res...
GetText | 7 min ago | 0.25 KB
⭐ 500$ For 45 Minutes HE
JavaScript | 11 min ago | 0.06 KB
Your Bitcoin Wallet Credentials have been res...
GetText | 16 min ago | 0.26 KB
⭐GET ANY GIFT-CÂRD FOR FREE⭐ MG
JavaScript | 19 min ago | 0.06 KB
⭐GET ANY GIFT-CÂRD FOR FREE⭐ HZ
JavaScript | 27 min ago | 0.06 KB
⭐ 500$ For 45 Minutes HE
JavaScript | 35 min ago | 0.06 KB
⭐GET ANY GIFT-CÂRD FOR FREE⭐ MG
JavaScript | 43 min ago | 0.06 KB
⭐GET ANY GIFT-CÂRD FOR FREE⭐ W9
JavaScript | 46 min ago | 0.06 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!