TASK DEFINITION: This task is to find the number of 'For' loops present in the given cpp program.
PROBLEM: int factors(int n,int min)
{
     int varieties=0,i;
     if(n==1)  return 1;
     else
     {
            for(i=min;i<=n;i++)
            {
                if(n%i==0)
                {
                    varieties+=factors(n/i,i);
                }
            }
        }
        return varieties;
}
int main()
{
    int n;
    cin>>n;
    int a[n],b[n];
    int i;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        b[i]=factors(a[i],2);
    }
    for(i=0;i<n;i++)
    cout<<b[i]<<endl;
    return 0;
}


SOLUTION: 3

PROBLEM: 
int s=0;

void find(int min,int dev)
{
    int i;
    for(i=min;i<=sqrt((float)dev);i++)
       if(dev%i==0)
          {
                 s++;
                 find(i,dev/i);
          }
}

int main()
{
    int n,i,m,j;
	scanf("%d",&m);
	for(j=1;j<=m;j++){
    scanf("%d",&n);
    for(i=2;i<=sqrt((float)n);i++)
        if(n%i==0)
          {
                 s++;
                 find(i,n/i);
          }
		printf("%d\n",s+1);s=0;}
    //getchar();
    //getchar();
	return 0;
}

SOLUTION: 3

PROBLEM: 
int dp[40000][200]={0};
int main()
{
    int n,i,N;
    int mm( int , int );
    
    cin>>n;
    for(i=1;i<=n;i++)
    {
                     cin>>N;
                     cout<<mm(N,2)<<endl;
                   // if(prime(N)) cout<<"haha";
    }
   
    return 0;
}

int mm( int n, int i)
{
    int sum=1;
    
    if(dp[n][i]>0) return dp[n][i];
    
    
    for(int j=i; j<=sqrt(n);j++)
    {
             if(n%j==0)
             {
                       sum += mm(n/j,j);
             }
    }
    dp[n][i]=sum;
    return sum;
}
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  


SOLUTION:
2