Implement int sqrt(int x). Compute and return the square root of x. Solution 123456789 public class Solution { public int mySqrt(int x) { long r = x; while(r*r > x) { r = (r+x/r)/2; } return (int)r; }} 赞微海报分享
近期评论