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

Input: Consider 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;
}

Output: 2


Input: Consider Input: /*
 * fengjie.cpp
 *
 *  Created on: 2013-11-23
 *      Author: sony
 */

int sum;

void f(int x,int i){
	if (x == 1) sum++;
	for(;i<=x;i++)
		if (x%i == 0) f(x/i,i);
	return;
}

int main(){
	int t,a,i=2;
	cin>>t;//????????
	for (a = 0; a<t ; a++){
		int x;
		cin >> x;
		int ans = 1;
		for(i = 2; i<sqrt(x) ; i++){
			sum = 0;
			if(x%i == 0) f(x/i,i);
			ans = ans + sum;
		}
		cout<<ans<<endl;
	}
	return 0;
}


Output: 3


Input: Consider Input: int f(int t) 
{
    double v=sqrt(t)+1;
    for(int i=2; i<v; i++)
    if(t%i==0) return 0;
    return 1;
}
int sum=0;
void fun(int n,int i) 
{
     if(n==1)
     sum++;
     while(i<=n)
     {
     if(n%i==0)
     fun(n/i,i);
     i++;
    }
    return ;
}
int main() 
{
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++) 
      {
      int a;
      scanf("%d",&a);
      if(f(a)>0) 
      {
      printf("1\n");
      continue;
      }
      int i=2,K=1;
      while(i<=a/2) 
      {
        if(a%i==0) 
        {
        sum=0;
        fun(a/i,i);
        K+=sum;
        }
        i++;
      }
        printf("%d\n",K);
      }
}


Output: 2


