Skip to content

Commit ddfb472

Browse files
authored
Completed "Light More Light"
1 parent be5fc13 commit ddfb472

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package Light_More_Light;
2+
import java.util.Scanner;
3+
4+
public class Main {
5+
6+
public static void main(String[] args) {
7+
Scanner s = new Scanner(System.in);
8+
long next = 0;
9+
10+
while ((next = s.nextLong()) != 0) {
11+
long sqrt = (long) Math.sqrt(next);
12+
if (Math.pow(sqrt, 2) == next)
13+
System.out.println("yes");
14+
else
15+
System.out.println("no");
16+
}
17+
s.close();
18+
System.exit(0);
19+
20+
}
21+
22+
}

0 commit comments

Comments
 (0)