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

Ex Input:

/*
????
??
?????????????
f[i,j]????i????j?????????
??????????
i?j????N?????O(sqrt(n))???
?????
?????O(n^(3/2))
?????O(n)
*/
int main()
{
int f[200][200] = {0};
int div[40000] = {0};
int divth[200] = {0};
int kase = 0;
cin >> kase;
for (; kase > 0; kase --)
{
int n = 0;
cin >> n;
memset(f,0,sizeof(f));
memset(div,0,sizeof(div));
memset(divth,0,sizeof(divth));
int m = 0;
for (int i = 1; i <= n; i ++)
if (n % i == 0)
{
div[i] = ++m;
divth[m] = i;
}
f[1][1] = 1;
for (int i = 2; i <= m; i++)
for (int j = 2; j <= i; j++)
for (int k = j; k > 1; k--)
if (divth[i] % divth[k] == 0)
{
int ii = divth[i] / divth[k];
int jj = k;
if (div[ii] < jj) jj = div[ii];
f[i][j] += f[div[ii]][jj];
}
cout << f[m][m] << endl;
}
return 0;
}

Ex Output:
5

Ex Input:
int divide(int d,int n)
{
int sum=0;
for(int i=d;i<n;i++){
if (n%i==0&&(n/i)>=i){
sum=sum+1;
sum=sum+divide(i,n/i);}}
return (sum);
}
int main()
{
int n,num;
cin>>n;
for(int i=0;i<n;i++){
cin>>num;
cout<<divide(2,num)+1<<endl;}
return 0;
}

Ex Output:
2

Ex Input:

int f(int a,int min)
{
if(a < min)
{
return 0;
}

int r= 1;
for(int i = min;i<a;i++)
{
if(a%i == 0)
{
r+= f(a/i,i);
}
}

return r;
}

main()
{
int n,a,i,j=0,k,m=0,r=0;
scanf("%d",&n);

for(k=0;k<n;k++)
{
scanf("%d",&a);

if(k!=n-1)
printf("%d
",f(a,2));
else
printf("%d",f(a,2));

}

}

Ex Output:
2