Skip to content

Instantly share code, notes, and snippets.

@KT-Yeh
Created February 8, 2014 02:22
Show Gist options
  • Save KT-Yeh/8875706 to your computer and use it in GitHub Desktop.
Save KT-Yeh/8875706 to your computer and use it in GitHub Desktop.
#include <cstdio>
#include <cmath>
using namespace std;
typedef unsigned int uint;
int main()
{
uint n;
while (scanf("%u",&n)){
if (!n) break;
uint a = sqrt(n);
if (a * a == n) printf("yes\n");
else printf("no\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment