-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFSQRT.java
More file actions
23 lines (19 loc) · 795 Bytes
/
Copy pathFSQRT.java
File metadata and controls
23 lines (19 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// In olden days finding square roots seemed to be difficult but nowadays it can be easily done using in-built functions available across many languages .
//Assume that you happen to hear the above words and you want to give a try in finding the square root of any given integer using in-built functions. So here's your chance.
.
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
for (int i = 0 ; i < cases; i++){
int n = input.nextInt();
System.out.println((int)Math.sqrt(n));
}
}
}