-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhelp.java
More file actions
31 lines (26 loc) · 807 Bytes
/
help.java
File metadata and controls
31 lines (26 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class help {
public static void karla() throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int input = Integer.parseInt(reader.readLine());
int i=0;
while(i<input)
{
int k = Integer.parseInt(reader.readLine());
double sqrt = Math.sqrt(k);
int x = (int) sqrt;
if(Math.pow(sqrt,2) == Math.pow(x,2))
System.out.println(1);
else
System.out.println(0);
i++;
}
}
public static void main(String[] args) throws IOException
{
karla();
}
}