#include <cstdio> int main() { int n; while(scanf("%d", &n) != EOF) { int k = 0; for(int i = 1; i <= n; ++ i) if(n % i == 0) k ++; if(k % 2 == 0) printf("0 "); else printf("1 "); } return 0; }
#include <cstdio> int main() { int n; while(scanf("%d", &n) != EOF) { int k = 0; for(int i = 1; i <= n; ++ i) if(n % i == 0) k ++; if(k % 2 == 0) printf("0 "); else printf("1 "); } return 0; }