instruction:
This task is to find the number of 'For' loops present in the given cpp program.
question:
int decomposition(int m,int k){
int res=1;
for(int i=k;i*i<=m;i++){
if(m%i==0&&m/i>=i){

res+=decomposition(m/i,i);
}
}
return res;
}
int main(){
int n;
while(scanf("%d",&n)==1){
for(int i=0;i<n;i++){
int m;
scanf("%d",&m);
printf("%d
",decomposition(m,2));
}
}
return 0;
}
answer:
2

question:
//**********************************************
//**???1090 ????*************************
//**?????? 1000012741*********************
//**???2010?12?7?*************************
//**********************************************
//??change???a???????p???????
int change (int a, int p)
{
int i, count = 0; //count??????????
for (i = p; i < a; i++)
{
if (a % i == 0 && a / i >= i) //??????????????
{
count++; //???1
int k, t;
k = (int) sqrt(a / i); //?k?a/i????
for (t = 2; t <= k; t++)
{
if ((a / i) % t == 0) //??a???2?k??????
{
count += change (a / i, i); //?a/i??????
break;
}
}

}
}
return count; //??count?
}
int main()
{
int n, i, a; //n?????????a?????
cin >> n;
for (i = 1; i <= n; i++)
{
int total = 0; //total?????
cin >> a;
total += change (a, 2); //??change??
cout << total + 1 << endl; //??1?????????????
}
return 0;
}
//**********************************************
answer:
3

question:
int f(int x,int y)
{
int a,n=1;
for(a=y;a<=sqrt(x);a++)
{
if(x%a==0)
{
n+=f(x/a,a);
}
}
return n;
}
int main()
{
int m,i;
scanf("%d",&m);
int x[m],n[m];
for(i=0;i<m;i++)
{
scanf("%d",&x[i]);
n[i]=f(x[i],2);
}
for(i=0;i<m;i++)
{
printf("%d
",n[i]);
}
return 0;
}

answer:
3