int main(){

    long t; scanf("%ld", &t);
    while(t--){
        long n; scanf("%ld", &n);
        long res(0);
        while(n--){
            long h; scanf("%ld", &h);
            long cnt = countPrimeFactors(h);
            res ^= cnt;
        }

        puts(res ? "1" : "2");
    }

    return 0;
}
Beispiel #2
0
int main()
{
	int consecutifs = 0;
	unsigned long long n = 1;

	while(consecutifs < 4)
	{
		n++;
		if(countPrimeFactors(n) >= 4)
			consecutifs++;
		else
			consecutifs = 0;
		//printf("n = %lld (%d)\n", n, consecutifs);
	}

	printf("\033[1mResultat : %lld\033[0m\n", n-3);

	//scanf("%ld", &n);
	//printf("%d\n", countPrimeFactors(n));
	return 0;
}