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

Example Input: int ans = 0;
int work(int p,int k)
{ if (p==1) {ans++; return (p*k,k);}
for(int i =k;i <= p;i ++){
if(p % i == 0){
work(p / i,i);

}
}
}
int main()
{
int n;
scanf("%d",&n);
while(n--){
ans = 0;
int t;
scanf("%d",&t);
work(t,2);
//ans = work(t);
printf("%d
",ans);
}

return 0;
}
Example Output: 1

Example Input: int F(int n,int a)
{
if(n==1) return 1;
if(a==1) return 0;
if(n%a==0) return F(n/a,a)+F(n,a-1);
return F(n,a-1);
}
main()
{
int n,a,i;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a);
printf("%d
",F(a,a));
}
}
Example Output: 1

Example Input: int fenjie(int n,int min)
{int i,a=0,x=0;
for(i=2;i<=n;i++)
if(n%i==0)
a=a+1;
if(n==1)
return 1;
else
{
for(i=min;i<=n;i++)
{
if(n%i==0)
x=x+fenjie(n/i,i);
}
return x;
}
}
main()
{
int t,j,num;
scanf("%d",&t);
for(j=1;j<=t;j++)
{
scanf("%d",&num);
printf("%d
",fenjie(num,2));}
}
Example Output:
3