Commit ad613f06 by BellCodeEditor

save project

parent 64c663f1
Showing with 13 additions and 13 deletions
...@@ -4,15 +4,15 @@ low=0 ...@@ -4,15 +4,15 @@ low=0
num=9 num=9
high=len(num_list)-1 high=len(num_list)-1
def
while low<=high: while low<=high:
mid=(low+high)//2 mid=(low+high)//2
guss1=num_list[mid] guss1=num_list[mid]
if num==guss1 : if num==guss1 :
print(num) print(num)
break break
elif num>guss1: elif num>guss1:
low=mid+1 low=mid+1
else: else:
high=mid-1 high=mid-1
print('没有') return None
\ No newline at end of file \ 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