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

Ex Input:
/*
 * fenjie.cpp
 *
 *  Created on: 2010-11-28
 *      Author: ???
 *      function: ????
 */
int solutionNumber(int a,int k){//??????????????
	int i;
	if(a==1) return 1;
	if(k>a) return 0;
	for(i=k;i<=a;i++)
	    if(a%i==0) return solutionNumber(a,i+1)+solutionNumber(a/i,i);
}
int main()
{
	int n,a[101];
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];//??????
		cout<<solutionNumber(a[i],2)<<endl;//????????????
	}
	return 0;
}




Ex Output:
2


Ex Input:
int ways(int n,int p)
{
	if(n<p) return 0;
	while(n%p!=0) p++;
	if(n==p) return 1;
	return ways(n/p,p)+ways(n,p+1);
}
int main()
{
	int n,m;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>m;
		cout<<ways(m,2)<<endl;
	}
	return 0;
}

Ex Output:
1


Ex Input:
/*int hf[32768][32768]={0};
int work(int m,int n)
{
	if(hf[m][n]!=0)
	return hf[m][n];
	if(m%n!=0)
	{
		hf[m][n]=0;
		return 0;
	}
	for(int i=n;i<=m/n;i++)
	hf[m][n]+=work(m/n,i);
	return hf[m][n];
}*/
int work(int m,int n)
{
	if(m==n)
	return 1; 
	if(m%n!=0)
	return 0;
	int sum=0;
	for(int i=n;i<=m/n;i++)
	sum+=work(m/n,i);
	return sum;
}
int main()
{
	int n,m,a;
	cin>>n;
	int i,j,k;
	for(i=1;i<=n;i++)
	{
		cin>>m;
		int s=0;
		for(j=2;j<=m;j++)
		s+=work(m,j);
		cout<<s<<endl;
	}
	return 0;
}


Ex Output:

4


