题目链接
http://bailian.openjudge.cn/practice/2749/
#include <iostream>
#include <cstdio>
using namespace std;
int f(int begin, int tot)
{
int res = 1; // 自己本身就是1个
if(begin == tot)
return 1;
if(begin > tot)
return 0;
for(int i=begin;i<tot;i++)
{
if(tot%i == 0)
{
res += f(i, tot/i);
}
}
return res;
}
int main()
{
int n, a;
scanf("%d", &n);
while(n--)
{
scanf("%d", &a);
printf("%d\n", f(2, a));
}
return 0;
}