virtual hust 2013.6.21 NEFU 挑战编程----数论 A - Light, more light

题目:Light, more light

思路:之前做过了的,直接判是不是完全平方数就可以知道约数的奇偶性了

 

#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
using namespace std;
int main()
{
    long long n;
    while(scanf("%lld",&n),n)
    {
        long long tmp=(long long)sqrt(n);
        if(tmp*tmp==n)
            printf("yes\n");
        else
            printf("no\n");
    }
    return 0;
}
View Code

 

posted @ 2013-06-21 11:24  over_flow  阅读(129)  评论(0编辑  收藏  举报