BETA

Difficulty Level:

Basic

Total Submissions: 5238 Accuracy:

49.85%

Square root (Function Problem)
     

Given an integer x , Your task is to find the  square root of it. If x is not a perfect square, then return floor(√x)

Input:

You have to complete the method which takes 1 argument: the integer N. You should not read any input from stdin/console. There are multiple test cases. For each test cases, this method will be called individually.

Output:

Your function should return square root of given integer.

Constraints:

1 ≤ T ≤ 1000
1 ≤ N ≤ 1000000

Example:

Input
2
5
4

Output
2

2

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Amit Khandelwal


					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.