Commit 54fa6de8 by BellCodeEditor

save project

parent e74beaf9
Showing with 4 additions and 5 deletions
num = 2 num = int(input( ))
low = 0 low = 0
high = 1000 high = 1001
a=[] a=[]
for i in range(1001): for i in range(1001):
a.append(i) a.append(i)
break for i in range(8):
for i in range(100):
mid = (low+high)//2 mid = (low+high)//2
if a[mid] == num: if a[mid] == num:
print(a[mid]) print(mid)
elif mid < num: elif mid < num:
low = mid+1 low = mid+1
else : else :
......
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