Commit 6d2d57a9 by BellCodeEditor

auto save

parent 15eb9968
Showing with 16 additions and 15 deletions
# 使用二分查找法,找出9和20在列表里面的索引
num_list = [1, 3, 5, 8, 11, 15, 17, 18, 20, 21]
d=0
c=len(num_list)-1
b=(c+d)//2
a=20
while c>d:
if a==num_list[b]:
print('猜到了')
if a<num_list[b]:
d=b+1
elif:
d=b-1
\ No newline at end of file
def gg():
s=220/2
ss=s+2
ss1=220-ss
ssss=sss+2
ssss2=220-ssss
ssssss=sssss+2
ssssss3=220-ssssss
ssssssss=sssssss+2
ssssssss4=220-ssssssss
ssssssssss=ssssssss+2
ssssssssss5=220-ssssssssss
a=ss1+ssss2+ssssss3+ssssssss4+ssssssssss5+3
print(a)
gg()
\ 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