LeetCode OJ
Problems
Pick One!
Submissions
Discuss
Donate
Sign up
Sign in
Send Feedback
Sqrt(x)
Total Accepted:
7780
Total Submissions:
36112
My Submissions
Implement
int sqrt(int x)
.
Compute and return the square root of
x
.
Discuss
C++
Java
Python
class Solution { public: int sqrt(int x) { } };
public class Solution { public int sqrt(int x) { } }
class Solution: # @param x, an integer # @return an integer def sqrt(self, x):
Submit Solution
You have not signed in, cannot submit your code.
Submit failed, try again please.
You have attempted to resubmit too soon. Please resubmit in a moment.
Send Feedback