Implement int sqrt(int x).
Compute and return the square root of x.
很简单的题:
class Solution {
public:
int mySqrt(int x) {
return int(sqrt(x));
}
};
Implement int sqrt(int x).
Compute and return the square root of x.
很简单的题:
class Solution {
public:
int mySqrt(int x) {
return int(sqrt(x));
}
};