UVA 10110 - Light, more light

UVA Sep 1, 2020

Problem PDF

Solution:

#include
#include
int main()
{
    long long n,a,b;
    while(scanf("%lld",&n)==1)
    {
        if(n==0)
        break;
        a=sqrt(n);
        b=a*a;
        if(b==n)
        printf("yes\n");
        else
        printf("no\n");
    }
    return(0);
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10110/10110.cpp

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.