Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 269 Bytes

查找.md

File metadata and controls

25 lines (18 loc) · 269 Bytes
#顺序查找
l=[1,3,56,85,23,6,9,4,66]
x=int(input())
length=len(l)
i=0
while i<length:
    if x==l[i]:
        print("zhandaole")
        break
    i=i+1
if i>=length:
    print("zhaobudao")
#折半查找
#