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

Ex Input:
int fenj(int x, int y) {
  int a=(x==1),i;
  for (i=y;i<=x;i++)//???2?????????
	  if(x%i==0)a=a+fenj(x/i,i);//?????????
  return a;
}
int main(){
	int k;
	cin>>k;
	int a[k];
	for(int i=0;i<k;i++)cin>>a[i];
	for(int i=0;i<k;i++)cout<<fenj(a[i],2)<<endl;
	return 0;
}

Ex Output:
3


Ex Input:
int t=0,ways;  //??????t?ways
void divide(int x,int h)
{
	int i;
	if(x==1)  //??x==1
	{t++;ways=t;}  //t+1?ways?????t
	else
		for(i=h;i<=x;i++)
			if(x%i==0)
				{h=i;
				divide(x/h,h);  //h?????????????divide?????????
				}
}
int main()
{
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	{cin>>a[i];
	t=0;divide(a[i],2);
	cout<<ways<<endl;}
	return 0;
}

Ex Output:
2


Ex Input:
/*
 *  1000012850_34.1.cpp
 *  ????????????a??????????????? ?????????
 *  Created on: 2010-11-27
 *      Author: william
 */
int resolution_into_factors(int j,int i)
{
	int m, sum=0, k=0;
	for(m=j ;m<=sqrt(i); m++)
	{
		if(i%m==0)
		{
            sum=resolution_into_factors(m, i/m)+sum+1;
			k++;
		}
	}
	if(k==0) return 0;
    return sum;
}
int main()
{
    int n, k, i;
    cin>>n;
    for(k=1; k<=n; k++)
    {
    	cin>>i;
    	cout<<resolution_into_factors(2,i)+1<<endl;
    }
    return 0;
}

Ex Output:

2


