class Solution { public: /** * * @param x int整型 * @return int整型 */ int sqrt(int x) { int i=0, ans=1; for(i=0; i*i<=x; i++){ } return --i; } };