this problem equal to find the biggest element that smaller or equal to target number in an array

anther similar question is https://discuss.leetcode.com/topic/67217/8-lines-python-binary-search-beat-92-17 finding the biggest element that bigger or equal to target number in an array

```
class Solution(object):
def mySqrt(self, x):
"""
:type x: int
:rtype: int
"""
i,j = 0,x/2+1
while i <= j:
mid = (i+j)>>1
if mid*mid > x:
j = mid-1
else:
i = mid+1
return j
```