#include <stdio.h>
#include <math.h>
int
main(int argc, char **argv) {
int n, i, cnt, temp;
while (scanf("%d", &n) == 1) {
cnt = 0;
temp = (int)sqrt(n);
for (i = 1; i <= temp; ++ i) {
if (n % i == 0) {
if (i != n / i) cnt += 2;
else cnt++;
}
}
if (cnt & 1) printf("1\n");
else printf("0\n");
}
}
HDU 2053 Switch Game
最新推荐文章于 2017-12-31 16:53:04 发布