Sqrt(x) 题目描述Implement int sqrt(int x).Compute and return the square root of x.x is guaranteed to be a non-negative integer.解题思路有一个避免溢出的方法 避免溢出的小技巧,就是把mid*mid == x写成mid == x/mid。对于一个非负整数,它的平方根不会超 leetcode 2023-12-15 53 点赞 0 评论 80 浏览