import random
n=int(input("请输入随机数个数n:"))
d=[]
for i in range(n):
d.append(random.randint(1,100))
print(d)
key=int(input("请输入需要查找的数:"))
for i in range(len(d)):
if key==d[i]:
print("查找成功!索引号为:",i)
break