因为痛,所以叫青春

我有一个梦想:穷屌丝变身富屌丝
uva10110 Light, more light
View Code
#include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{
    unsigned int n, k;
    while(scanf("%d",&n) && n)
    {
        k = floor(sqrt((double)n));
        if(k*k == n)
            puts("yes");
        else
            puts("no");
    }
    return 0;
}

posted on 2012-07-31 19:07  Nice!  阅读(202)  评论(0编辑  收藏  举报