//其实考的是二分查找,找错误开始的版本
//理解题目很重要
int left = 1,right = n;
while(left < right) {
int mid = left + (right - left) / 2;
//题目总会出一些大的数字刁难,哈哈
if(isBadVersion(mid)){
right = mid;
} else {
left = mid + 1;
}
}
return left;