二分法
arr = range(10000000)
start = 0
end = len(arr)-1
res = 776575
count = 0
print arr.index(res)
while True:
count = count+1
mid = (start+end)/2
if arr[mid]>res:
end = mid
elif arr[mid]<res:
start = mid
else:
print mid
break
print count