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)
相關文章
相關標籤/搜索