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

[Q]: /*
 *  Created on: 2011-11-18
 *      Author: 1100012870
 */

int su[40000],b[10000],ans;

void zhaosushu()
{
	int i,j,p;
	for(i=2;i<32768;i++)
	{
		p=1;
		for(j=2;j<=sqrt(i);j++)
			if(i%j==0){
				p=0;
				break;
			}
		if(p==0)continue;
		su[p]=1;
	}
}

void resolve(int a,int x)
{
	int i;
	if(a==1 || (su[a]==1 && a>=b[x-1])) {
		ans++;
		return;
	}
	for(i=2;i<=a;i++)
		if(a%i==0 && i>=b[x-1]){
			b[x]=i;
			resolve(a/i,x+1);
			b[x]=0;
		}
}

int main()
{
	int n,i,a;
	memset(su,0,sizeof(su));
	zhaosushu();
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		ans=0;
		memset(b,0,sizeof(b));
		resolve(a,1);
		cout<<ans<<endl;
	}
	return 0;
}
[A]: 4


[Q]: /*
 * ????@.cpp
 *
 *  Created on: 2011-11-27
 *      Author: Administrator
 */
int num0;//????
int factor(int x, int y)//?????
{
	int countn = 1;//????????1
	if ( x == 1 )
		return 0;
	if ( x == 2 )
		return 1;//??1,2?????
	for ( int i = y; i <= sqrt(x); i ++)
		if ( x % i == 0 )
			countn += factor(x / i, i);//?????
	return countn;
}
int main()//?????
{//?????
	int n, j;//????
	cin >> n;//????
	for ( j = 1; j <= n; j++)
	{
		cin >> num0;//???????
		cout << factor(num0, 2) << endl;//??????
	}
	return 0;//???????????????????
}//????


[A]: 2


[Q]: int sum=0;
int main()
{
	void yinshu(int,int);//????????????????????????
	int i,n,a;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		sum=0;
		cin>>a;
		yinshu(a,2);
		cout<<sum<<endl;
	}
	return 0;
}

void yinshu(int a,int x)
{
	if(a!=1)
	{
	for(int i=x;i<=a;i++)//?x?????
		if(a%i==0)//????
			yinshu(a/i,i);//?a/i??????????????i???
	}
	if(a==1)//????????????
		sum++;
}
[A]:
2