This problem is in Contest(s) below:
Contest 1937:算法基础练习(1)
Contest 1847:基础算法(1)二分查找和二分答案
Contest 1920:七、八年级基础算法复习题目