Commit 6c58978e by BellCodeEditor

save project

parent 43c472e0
Showing with 5 additions and 0 deletions
...@@ -4,6 +4,7 @@ num = 20 ...@@ -4,6 +4,7 @@ num = 20
low = 0 low = 0
high = len(num_list )-1 high = len(num_list )-1
while True: while True:
if high<=num:
mid = (low+high)//2 mid = (low+high)//2
guess = num_list[mid] guess = num_list[mid]
if guess == num: if guess == num:
...@@ -14,6 +15,9 @@ while True: ...@@ -14,6 +15,9 @@ while True:
else: else:
high = mid-1 high = mid-1
else:
print("没找到")
break
\ 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