import java.util.*; public class Solution { public int sqrt(int x){ if(x<=0) return 0; int low=1,high=x; while (low<high>x) { return mid; }else if (mid*mid>x){ high=mid-1; }else { low=mid; } } return low; } }</high>
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务