Commit e74beaf9 by BellCodeEditor

auto save

parent a0556901
Showing with 13 additions and 2 deletions
num = 2
low = 0
high = 1000
a=[]
for i in range(1001):
a.append(i)
print(a)
\ No newline at end of file
break
for i in range(100):
mid = (low+high)//2
if a[mid] == num:
print(a[mid])
elif mid < num:
low = mid+1
else :
high = mid-1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment