Thursday, January 21, 2016

UVA 10110 Light more light Solution

#include<stdio.h>
#include<math.h>
int main()
{
long long n,r;
while(scanf("%lld",&n)==1)
{
if(n==0)
break;
r=sqrt(n);
if(r*r==n)
printf("yes\n");
else
printf("no\n");
}
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)