This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author : Md.Mehadi Hasan Menon. | |
* Problem : 10110-Light,more light. | |
* Stauts : Accepted. | |
* Date : 14.10.2014. | |
**/ | |
#include <stdio.h> | |
#include <math.h> | |
int main() | |
{ | |
unsigned int n, a; | |
while(scanf("%u", &n) == 1 && n != 0) | |
{ | |
/* if n is a prefect square than | |
it has odd number of factor */ | |
a = sqrt(n); | |
if(a * a == n) | |
printf("yes\n"); | |
else | |
printf("no\n"); | |
} | |
return 0; | |
} |
Comments
Post a Comment