Square Number

Square Number
You are given a positive integer number n. You have to check, if the number is square of
another integer number.
Say a number ‘A’ is called the square number of ‘B’ if and only if A = B*B . That’s why 4 is a
square number because 4 = 2 * 2 .
.
Input:
Input starts with an integer T (T<=100), denoting the number of test case. The following T line
will have a positive integer number n (n<=1000).
.
Output:
For each test case first print the case number “Case %d: ” and then print "YES", if the number is
square of another integer number, else print "NO".
Please check sample input/output to understand the format.
Sample Input
Sample Output
2
3
4
Case 1: NO
Case 2: YES
Limits:
Language
C
C++
Java
C#
Time
1 Second
1 Second
4 Second
4 Second
Memory
50MB
50MB
50MB
50MB
For Java, use main as class name, do not mark your class as public and do not use custom package.
Follow Ideone rule for java compilation, if you get compile error, try your code in ideone.com to see
your problem.
Dev Skill | www.devskill.com
1