This task is to find the number of 'For' loops present in the given cpp program.

Q: /*
 *?????
 *???2010 - 12 - 07
 *?????????  ????
 */
int num(int,int,int);
int qufen(int);
int power(int,int);
int main()
{
	int t;
	cin >> t;
	while(t >= 1)
	{
		int n,i,x,sum = 1;
		cin >> n;
		x = qufen(n);                  //qufen????????????????????
		for(i = 2; i <= x; i++)
			sum = sum + num(n,i,2);      //num?????????????i????????
		cout << sum << endl;
		t--;
	}
	return 0;
}
int qufen(int n)
{
	int j;
	for(j = 1; ; j++)
	{
		if(power(2,j) > n)
		{
			return j - 1;
			break;
		}
	}
}
int power(int a,int b)
{
	int sum = 1,k;
	for(k = 1; k <= b; k++)             //?????????
		sum = sum * a;
	return sum;
}
int num(int n,int g,int h)
{
	if((g == 1)&&(n >= h))          //???????
		return 1;
	int i,j = 0,count = 0,a[20000];  
	for(i = h; i < n; i++)                 //???????????? n ?? i ?? g ??????n / i????? g - 1?
	{                                      //?n = i * ?g?? ???? n / i = h * (g - 1 ???h??????i???
		if(n % i == 0)
		{
			a[j] = i;
			j++;
		}
	}
	if(j == 0)                     //j == 0?????????????????
		return 0;
	else
	{
		for(i = 0; i < j; i++)
			count = count + num(n / a[i],g - 1,a[i]);
		return count;
	}
}

A: 5
****
Q: int num = 0;
void check(int m, int n)
{
	for(;m <= n; m++)
	{
		if(n % m == 0)
		{
			if(n / m == 1)
			{	
				num++;
				return;
			}
			else
				check(m, n / m);
		}
	}
}
int main()
{
	int n, m;
	cin >> n;
	for(; n; n--)
	{
		cin >> m;
		check(2, m);
		cout << num << endl;
		num = 0;
	}
	return 0;
}

A: 2
****
Q: int t, a, flag, a1;
/*bool prime(int k)
{
	int j, sqrt_k;
	if (k == 2)
		return 1;
	else
	{
		sqrt_k = sqrt((double)k);
		for (j = 2; j <= sqrt_k; j++)
		{
			if (k % (int)j == 0)
				break;
		}
		if (j == sqrt_k + 1)
			return 1;
		else
			return 0;
	}
}
/*
void find(int m)
{
	int i;
	if (prime(m))
	{
		flag = 1;
		t++;
	//	cout << t << endl;
		return;
	}
	for (i = 2; i <= sqrt((double) m); i++)
	{
		if ((m % i == 0) && (a1 <= i))
		{
		//	cout << a1 << 2<< endl;
			//cout << i <<  " " << 1 <<endl;
			a1 = i;
			//if (!prime(m / i))
				t++;
		//	cout << t << endl;
			find(m / i);
		}
	}
	return;
}*/
void find(int m, int min)
{
	int i;
	//int a[];
	for (i = 2; i <= sqrt((double)m); i++)
	{
		if (m % i == 0)
		{
			if (i >= min)
			//if (a1 >= i)
			{
				t++;
		//	if (!/*((m / i > i) && */(prime(m / i)))
			//	cout << t << " ";
			//	cout <<i<<" " << m / i << " " << t <<endl;
			//	t++;
			//	cout << " " << a1 <<endl;
				//cout << t<<endl;
			//	a1 = i;
				min = i;
				//cout << min << endl;
				find(m / i, min);
				
			}
			
		}
	}
	/*if (i == (int)sqrt((double)m) - 1)
		return;*/
	return;
}
int main()
{
	int n, ii;
	cin >> n;
	for (ii = 1; ii <= n; ii++)
	{
		t = 0;
		flag = 0;
		cin >> a;
	//	if (prime(a)) t--;
		a1 = a;
		find(a, 2);
		cout << t + 1<< endl;
	}

	return 0;
}

A:
4
****