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

[EX Q]:
int devide(int n,int m)
{
if(n<m)
m=n;
if(n==1)//?????1?,??1
return 1;
int sum=0;
for(int i=m;i>=2;i--)
{
if(n%i==0)
{
sum=sum+devide(n/i,i);
}

}
return sum;
}

int main()
{
int n,i,m;
cin>>n;
i=0;
while ( i<n )
{
cin>>m;
cout<<devide (m,m)<<endl;//???????
i++;
}
return 0;

}
[EX A]: 1

[EX Q]: /*
* 1.cpp
*
* Created on: 2010-12-1
* Author: hanzhe
*/

int min(int a,int b){ //????
if(a>b)return b;
else return a;
}
int f(int n,int s){ //???????s?n???????
int k=0,i;
if(n==1)return 1;
else if(s==1)return 0;
else if(s>n)return f(n,n);
else {for(i=2;i<=s;i++)
if(n%i==0)k=k+f(n/i,min(i,s));
return k;
}
}
int main(){ //????
int n,m;
cin>>n;
while(n>0){
cin>>m;
cout<<f(m,m)<<endl; //??
n--;
}
return 0;
} //????

[EX A]: 1

[EX Q]: int f(int a,int s)
{
int y=0;
for (;s<=a;s++)
{
if (s==a)
y+=1;
else if (s>1&&a%s==0)
y+=f(a/s,s);
}
return y;
}
main ()
{
int n,i,a;
scanf ("%d",&n);
for (i=0;i<n;i++)
{
scanf ("%d",&a);
printf ("%d
",f(a,1));
}
}
[EX A]:
2