TASK DEFINITION: This task is to find the number of 'For' loops present in the given cpp program.
PROBLEM: int sum=0;//???????????
void fact(int a,int i)//?????;??????????a?????i?????
{
if(a==1) sum++;//???????N=1????????N????????1
while(i<=a)//????i???N
{
if(a%i==0) fact(a/i,i);//??N??i?????????????N/i??
i++;//??N???i???i?1
}
}
int main()//???
{
int n;//?????????
cin>>n;//??????
while(n--)//??
{
int a;//??????????
cin>>a;//????
int i=2;//???????2?
int result=1;//????????a??????
while(i<=a/2)//??i???a???
{
if(a%i==0)//??i?a???
{
sum=0;//sum??
fact(a/i,i);//????????/i
result+=sum;//????????i????
}
i++;//i?1
}
cout<<result<<endl;//??????
}
return 0;
}

SOLUTION: 0

PROBLEM: /*
* 1118-4.cpp
*
* Created on: 2011-11-29
* Author: Administrator
*/
int divide(int n,int a){
int s=0,t=0,i;
if(n==1) return 1;
for(i=a;i>1;i--)
if(n%i==0){
s+=divide(n/i,i);
t++;
}
if(t==0) return 0;
return s;
}
int main(){
int n,k;
cin>>k;
while(k>0){
cin>>n;
cout<<divide(n,n)<<endl;
k--;
}

return 0;
}

SOLUTION: 1

PROBLEM: int f(int x,int y)
{
int s=0,i;
for(i=y;i>1;i--)//???????????
{
if(x%i==0)
s+=f(x/i,i);//i?x/i????????1
}
if(x==1)
return 1;
return s;
}
int main()
{
int n,i,a[50];
cin>>n;
for(i=1;i<=n;i++)
cin>>a[i];
for(i=1;i<=n;i++)
cout<<f(a[i],a[i])<<endl;
return 0;
}

SOLUTION:
3