leetcode 69. Sqrt(x) 牛顿法求平方根

Implement int sqrt(int x).spa Compute and return the square root of x.code class Solution { public: int mySqrt(int x) { for (int i = 0; i <= x; i++) { if ((i*i) <= x && (i + 1) * (i + 1) > x)
相关文章
相关标签/搜索