Accepted solution

UVA 10110 - Solve Light,more Light

Open original problem
Source code

#include<stdio.h>

#include<math.h>

int main()

{

    long long int n,r;

    while(1)

    {

        scanf("%lld",&n);

        if(n==0)

        {

            break;

        }

        r=sqrt(n);

        if(r*r==n)

        {

            printf("yes");

        }

        else

        {

            printf("no");

        }

    }

    return 0;

}
Join the discussion

Add your comment