Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
бинарный поиск
nq1s788
Apr 16th, 2024
31
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
🤑 G2A.com Free Gift Card Guide Jun 2024 FIX 🤑
GetText | 6 min ago | 0.39 KB
"Bluetooth Motor" rev_09
Arduino | 28 min ago | 4.01 KB
🤑 G2A.com Free Gift Card Guide Jun 2024 FIX 🎁
GetText | 29 min ago | 0.36 KB
Threads CSS
CSS | 41 min ago | 3.03 KB
"Bluetooth Motor" rev_08
Arduino | 42 min ago | 5.20 KB
"Bluetooth Motor" rev_07
Arduino | 43 min ago | 5.21 KB
"Bluetooth Motor" rev_06
Arduino | 55 min ago | 7.51 KB
"Motor Control" rev_01
Arduino | 1 hour ago | 2.62 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!