TASK DEFINITION: This task is to find the number of 'For' loops present in the given cpp program.
PROBLEM: int num=0;
void count(int m,int j)
{
int i;
if(m==1) num++;
for(i=j;i<=m;i++)
{
if(m%i==0) {count(m/i,i);}
else continue;}
}
int main()
{
int n,i;
cin>>n;
for(i=1;i<=n;i++)
{
int m;
cin>>m;
num=0;
count(m,2);
cout<<num<<endl;
}
return 0;
}

SOLUTION: 2

PROBLEM: int im(int n,int max)
{
int s=0,i;
if(n==1)
return 1;
for(i=max;i>1;i--)
if(n%i==0)
s+=im(n/i,i);
return s;
}
int main()
{
int i,n,t;
scanf("%d%d",&n,&t);
printf("%d",im(t,t));
for(i=1;i<n;i++)
{
scanf("%d",&t);
printf("
%d",im(t,t));
}
//getch();
return 0;
}

SOLUTION: 2

PROBLEM:
const int mov[4][2] = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};

int m, n, counter;

void dfs(int m, int i) {
//cout << m << ' ' << n << endl;
if (m == 1) {
++counter;
return;
}
for (;i <= m; ++i) {
if (m % i == 0) {
dfs(m/i, i);
}
}
}

int main() {
int t, m, n;
cin >> t;
while (t--) {
counter = 0;
cin >> m;
dfs(m, 2);
cout << counter << endl;
}
}

SOLUTION:
1