python有一个解题思路是把二分查找完的左标尺left和1进行大小比较
class Solution:
def firstBadVersion(self, n):
"""
:type n: int
:rtype: int
"""
left = 0
right = n - 1
while(left<=right):
m = (left+right)//2
if isBadVersion(m):
right = m - 1
else:
left = m + 1
return max(1,left)