Commit d5a3c32f by BellCodeEditor

save project

parent a3b320c8
Showing with 2 additions and 2 deletions
...@@ -6,8 +6,8 @@ high=len(num_list-1) ...@@ -6,8 +6,8 @@ high=len(num_list-1)
while low <= high: while low <= high:
mid=(low+high)//2 mid=(low+high)//2
guss_num = num_list[mid] guss_num = num_list[mid]
if guss_num = bingo_num: if guss_num == bingo_num:
print("",mid) print("找到了,他在列表里的索引是",mid)
break break
elif guss_num < bingo_num: elif guss_num < bingo_num:
low=mid+1 low=mid+1
......
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