Tuesday 8 May 2012

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");
}
}

2 comments:

  1. though i know what you did here , but you must explain what is the concept behind your solution , coz people don't just come to sneak into your code.

    ReplyDelete