niryuu/sni-each-converted huggingface dataset:
void main()
{
	int f(int x,int m);
	int k,i,j,n,sum=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&k);
		for(j=2;j<=k;j++)
		{
			if(k%j==0)
			{
				sum+=f(k,j);
			}
		}
		printf("%d\n",sum);
		sum=0;
	}
}

int f(int x,int m)
{
	int i,sum=0;
	if(m==x)
		sum=1;
	else
	{
		x=x/m;
		for(i=m;i<=x;i++)
		{
			if(x%i==0)
			{
				sum+=f(x,i);
			}
		}
	}
	return sum;
}
Output: 3
int num=0;
void yinshu(int x,int y)
{
	if (x==y) num++;
	else if ((x%y==0)&&(x>y)) {yinshu(x/y,y);yinshu(x,y+1);}
	else if (x>y) yinshu(x,y+1);
}
int main()
{
	int n,x;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>x;
	yinshu(x,2);
	cout<<num<<endl;
	num=0;
	}
}

Output: 1
void factor(int x,int limit);
int result;
int main()
{
	int n;
	scanf("%d",&n);
	int input;
	for(int i=0;i<=n-1;i++)
	{
		scanf("%d",&input);
		result=1;//limit?2?????result=1;
		factor(input,2);//limit?2?????result=1;
		printf("%d\n",result);
	}
	return 0;
}
void factor(int x,int limit)
{
	int remainder;
	if(x<limit)
	{
		return;
	}
	for(int i=limit;i<=x;i++)
	{
		remainder=x%i;
		if(remainder==0)
		{
			if(x/i>=i)
			{
				result++;
				factor(x/i,i);
			}
		}
	}
}
Output: 2
int f(int a,int min)
{
	if(a<min)
	{
		return 0;
	}
	int k=1,i;
	for(i=min;i<a;i++)
	{
		if(a%i==0)
		{
			k=k+f(a/i,i);
		}
	}
	return(k);
}

int main()
{
	int f(int a,int min);
	int j,n;
	int a[100],b[100];
	scanf("%d",&n);
	for(j=0;j<n;j++)
		scanf("%d",&a[j]);
	for(j=0;j<n;j++)
	{
		b[j]=f(a[j],2);
		printf("%d\n",b[j]);
	}
	return 0;
}
Output: 3
int num=0;
int judge1(int n)
{
	int i;
	if(n==2||n==3||n==5)
		return 1;
	if(n==4)
		return 0;
	for(i=2;i*i<n;i++)
	{
		if(n%i==0)
		{return 0;break;}
	}
	if(i*i>n)
		return 1;
}
void divide(int n,int d)
{
	for(int i=d;i*i<=n;i++)
	{
		if(n%i==0)//&&judge1(i))
		{
			num++;
			divide(n/i,d);
		}
		d++;
	}
}
int main()
{
	int n,m;
	cin>>n;
	while(n)
	{
		n--;
		cin>>m;
		num=1;
		divide(m,2);
		cout<<num<<endl;
	}
	return 0;
}
Output: 2
int fj(int a, int b);

int main()
{
	int n, i, a;
	cin >> n;
	for(i = 0; i < n; i++)
	{
		cin >> a;
		cout << fj(a, 2) << endl;
	}

	return 0;
}
int fj(int a, int b)
{
	int j, x, sum = 1, f = 0;
	x = sqrt((double) a);
	if((a == 1) || (a == 2) || (a == 3))
		return 1;
	else
	{
	    for(j = b; j <= x; j++)
	    {
		    if(a % j == 0)
			{
			    sum += fj(a / j, j);
				f = 1;
			}
    	}
		if (f == 0)
	        return 1;
		else
			return sum;
	}
}
Output: 2
int t;
int main()
{int n,i,a[100];
void fenjie(int x,int y);
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{t=0;
fenjie(2,a[i]);
printf("%d\n",t);
}
return 0;
}

void fenjie(int x,int y)
{int j;
if(y==1){
t++;
return;}
for(j=x;j<=y;j++)
{if(y%j==0)
fenjie(j,y/j);
}

}



Output: 3
int main(){
	int number(int n, int low);
	int n, i, data, ans;
	scanf("%d", &n);
	for (i=1; i<=n; i++)
	{
		scanf("%d", &data);
		ans = number(data, 2);
		printf("%d\n", ans);
	}
}
int number(int n, int low)
{
	int j, ans;
	ans = 0;
	for (j = low ; j * j<= n; j++)
	{
		if (n % j == 0) 
			ans = ans + number(n / j, j);
	}
	ans = ans + 1;
	return ans;
}
Output: 2
/*************************************************************************************************************
* @file .cpp
* @author ????
* @date 
* @description
*         ????
*/

int i;
int fenjie( int x, int t)
{
	int j;
	if(x == 1 || x == 2)
		return 1;
	int s = 1;
	for (j = t; j <= sqrt(x); j++)
	{
		if (x % j == 0)
			s += fenjie((x / j), j);
	}
	return s;
}

int main()
{
	int n, a[100],x,t;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> x;
		a[i] = fenjie(x,2);
	}
	for(i = 0; i < n; i++)
		cout << a[i] << endl;
	return 0;
}
Output: 3
/**
* @file		????.cpp
* @author	??	1000012792
* @date		2010.12.3
*/

int f(int n, int m);				//??f:????m????n?????????????????
int main()
{
	int n, num, i;
	cin >> n;						//n???n???
	for(i=0;i<n;i++)
	{
		cin >> num;					//????????num,????????
		cout << f(num, 2) << endl;
	}
	return 0;
}
int f(int n, int m)
{
	int i, count=0;
	if(n==1)
		return 1;					//??n=1?????????1
	for(i=m;i<=n;i++)				//?????i?m?????n??
	{
		if(n%i==0)					//??n??i???????n/i????(???????i)???????f(n/i,i)
			count += f(n/i,i);		//count?????????
	}
	return count;					//??count??
}
Output: 2
int i=0;
int f(int n,int m)
{int k=0;
if(m==1)
i++;
else
{for(k=n;k<=m;k++)
   {if(m%k==0)
    {n=k;
     f(n,m/n);}}}
return(i);}
int main()
{
 int n,b,c;
 cin>>n;
 int a;
 for(b=0;b<n;b++)
   {cin>>a;
    c=f(2,a);
    cout<<c<<endl;
    i=0;}
 return 0;
}



Output: 2
void decprime(int begain,int a);
int sum=1;
int main()
{
	int n,a;
	int k;cin>>n;
	for(k=0;k<n;k++){
		cin>>a;
		 decprime(2,a) ;
		 cout<<sum<<endl;
		 sum=1;
	}
	return 0;
}
void decprime(int begain,int a)
{
	int i;
	 //int u=int(sqrt(double(a)));
//int m[10000]={};

	//if(a==2||a==3||a==5)return 1;
	//else{
		for(i=begain;i<=a;i++){
		if(a%i==0&&i<=a/i)
		{
			sum++;
			decprime(i,a/i);
		}
		if(i>a/i)break;
			//m[i]=decprime(a/i);
		//else m[i]=0;
//sum+=m[i];
		//}
	 //return sum+1;
	 }
		}

Output: 2
int shuliang(int m,int n);
main()
{
    int n;
    scanf("%d",&n);
    for (int i = 1;i <= n;i ++)
    {
        int x,q,answer=1;
        scanf("%d",&x);
        q=sqrt(x)+1;
        for (int j = 2; j < q; j ++)
        {
            if (x%j==0)
                answer+=shuliang(j,x/j);
                
        }
        printf("%d\n\n",answer);
    }
}

int shuliang(int m,int n)
{
    int q,answer=0,y=0;
    q=sqrt(n)+1;
    for (int j = m;j < q;j ++)
    {
        if (n%j==0)
            answer+=shuliang(j,n/j),y=1;
    }
    if(y==1)
        return answer+1;
    else
        return 1;
}
Output: 3
int yz[100],all=0;
int yinzi(int num,int amax)
{
	int i,j=0,geshu=0,key=num;
	if(num==1) return 1;
	else 
	{
		for (i=amax;i<all;i++) 
		{
			if(num%yz[i]==0)
			{
				num=num/yz[i];
				geshu=geshu+yinzi(num,i);
				num=key;
			}
		}
		return geshu;
	}
	return 0;
}
int main ()
{
	int num,n,i,c,j=0,k;
	cin>>n;
	for(k=0;k<n;k++) 
	{
		cin>>num;
		if(num==1) cout<<1<<endl;
		else
		{
			j=0;
			for (i=2;i<=num;i++)
			{
				if(num%i==0)
				{
					yz[j]=i;
					j++;
				}
			}
			all=j;
			cout<<yinzi(num,0)<<endl;
		}
	}
	return 0;
}

Output: 3
int su(int input)//?????????
{
	int ju=1;
	for(int i=2;i<sqrt(input);i++)
	{
		if(input%i==0) ju=0;
		break;
	}
	return ju;
}
int fenjie(int input, int k)//k???????????input??????
{
	int ret=1;//re??????????????
	for(int i=k;i<=sqrt(input);i++)
	{
		if(input%i==0)
		{
			if(su(input/i)==0);//????????????????????
			{
				ret=fenjie(input/i,i)+ret;
			}
		}
	}
	return ret;
}
int main()
{
	int input,num,sol;
	cin>>num;
	while(num--)//????
	{
		cin>>input;
		cout<<fenjie(input,2)<<endl;//sol??????????
	}
	return 0;
}

Output: 2
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;
}

Output: 2
int ys(int x,int min){
    int r=1;
    if(x<min)
    return 0;
    for(int i=min;i<x;i++){
            if(x%i==0)
              r+=ys(x/i,i);
            }
    return r;
}
int main(){
    int n,a[1000];
    scanf("%d",&n);
    for(int i=0;i<n;i++){
            scanf("%d",&a[i]);
            }
    for(int i=0;i<n;i++){
            printf("%d\n",ys(a[i],2));
            }
    return 0;
}

Output: 3
int p(int a,int m)
{
    int t=0;
    int i;
    if(a%m!=0)
        return 0;
    if((a%m==0)&&(a/m<m)&&(a!=m))
        return 0;
    if(a==m)
        return 1;
    if((a%m==0)&&(a/m>=m))
        {
            for(i=m;i<=a/m;i++)
            {t=t+p(a/m,i);}
            return t;
        }
}

int main()
{   int n;
    cin>>n;
    int i;
    int x;
    int j;
    int num=0;
    for(i=0;i<n;i++)
   {
          cin>>x;
          for(j=2;j<=x;j++)
          {
              num=num+p(x,j);
          }
          cout<<num<<endl;
          num=0;
   }

    return 0;
}

Output: 3
int main ()
{
	int factor(int n,int x);
	int n;
	int i,m;
	int a[100];

	scanf("%d",&m);
	for(i=0;i<m;i++)
	{
		scanf("%d",&n);
		a[i]=factor(n,2);
	}
	for(i=0;i<m;i++)
		printf("%d\n",a[i]);
	return 0;
}

int factor(int n,int x)
{
	int i,f=0;

	if(n==1)
        f=1;
	else
		for(i=x;i<=n;i++)
			if(n%i==0)
				f+=factor(n/i,i);
	return f;
}
Output: 3
int num = 0;
void check(int m, int n)
{
	for(;m <= n; m++)
	{
		if(n % m == 0)
		{
			if(n / m == 1)
			{	
				num++;
				return;
			}
			else
				check(m, n / m);
		}
	}
}
int main()
{
	int n, m;
	cin >> n;
	for(; n; n--)
	{
		cin >> m;
		check(2, m);
		cout << num << endl;
		num = 0;
	}
	return 0;
}
Output: 2
int num=1;
int sushu(int n)
{
	int i,sum=0;
	for(i=1;i<=sqrt(n*1.0);i++)
		if(n%i==0)
			sum++;
	if(sum==1)
		return 1;
	else 
		return 0;
}
void fenjie(int i,int k)//i???????k??????????? i?sqrt?n???
{
	int mid,j;
	mid=sqrt(k*1.0);
	for(j=i;j<=mid;j++)
	{
		if(sushu(k))
			break;
		else
		{
			if(k%j==0)
			{
				num++;
				fenjie(j,k/j);
			}
		}
	}
}
int main()
{
	int n,i;
	int a[100];
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n;i++)
	{
		fenjie(2,a[i]);
		cout<<num<<endl;
		num=1;
	}
	return 0;
}

Output: 4
int f(int a,int min)
{ 
    int i,result; 
    if(a<min) 
        return 0; 
    result=1; 
    for(i=min;i<a;i++) 
        if(a%i==0) 
            result+=f(a/i,i);
    return result; 
} 
int main() 
{ 
    int i,n,num[100]; 
    cin>>n; 
    for(i=0;i<n;i++) 
    { 
        cin>>num[i]; 
        cout<<f(num[i],2)<<endl; 
    } 
    return 0; 
} 

Output: 2
int num(int a,int b,int c)//??????????
{
	int sum=0,j;//sum????
	if(a>c)return 0;//???????????????0
	if(b==1)return 1;//????????????????
	for(j=a;j<=c;j++)//?????????????
		if(c%j==0)sum=sum+num(j,b-1,c/j);
	return sum;
}
int main()
{
	int k,n,m,e=0,i;//e??????
	cin>>n;
	while(e<n)
	{
		cin>>m;
		k=0;//k??m????????????????
		int f=m;
		for(i=2;i<=f;i++)
			if(f%i==0)
			{
				k++;
				f=f/i;
				i=1;
			}
		cout<<num(1,k,m)<<endl;//????????
		e++;
	}
	return 0;
}

Output: 2
int ways(int n,int p)
{
	if(n<p) return 0;
	while(n%p!=0) p++;
	if(n==p) return 1;
	return ways(n/p,p)+ways(n,p+1);
}
int main()
{
	int n,m;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>m;
		cout<<ways(m,2)<<endl;
	}
	return 0;
}
Output: 1
int sum=0,k=2;
int fenjie(int n,int k)
{ 
  int x,i,sum=0,p=0;
  x=(int)pow(n,0.5);
  for(i=k;i<=x;i++)
   {
     if(n%i==0) {k=i;sum=sum+fenjie(n/i,k);p=1;}
   } 
   if(p==0) return 1;
   if(p==1) return sum+1;
  }
 int main()
 {   int m,n,i;
     cin>>m;
     for(i=0;i<=m-1;i++)
      {
        cin>>n;
       cout<<fenjie(n,2)<<endl;
        sum=0;
      }
  
  return 0;
}
  
Output: 2
int Factor(int, int);
int main()
{
	int n, a, i;
	scanf("%d",&n);
	for (i = 1;i <= n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",Factor(a, 2));
	}
	return 0;
}
int Factor(int a,int p)
{
	int i, j, z = 1;
	if (a < p)
		z = 0;
	else
	{
		for (i = p;i <= a;i++)
		{
			if (a % i == 0)
			{
				z += Factor(a / i, i);
			}
		}
	}
	return z;
}
Output: 2
int f(int m,int k);

int main()
{
	int n,i,k,m;//????n,????m,???k
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>m;
		k=2;
		cout<<f(m,k)<<endl;
	}
	
	
	
	
	
	
	return 0;
}
int f(int m,int k)
{
	int m1,sum=1;
	m1=m;
	while(k<=(int)sqrt(m))
	{
		if(m%k==0)
		{
			m=m/k;
			
			sum=sum +f(m,k);
		}
		m=m1;
		k++;
	}
	return sum;
}
	

Output: 1
int f(int a,int b)
{
	if(a < b)
		return 0;
	int i,r =1 ;
	for(i = b; i <= a; i++ )
	{
		if( !(a%i) && i <= a/i )
		{
			r += f(a/i,i);
		}
	}
	return r;
}
void main()
{
	int n,m;
	scanf("%d",&n);
	while(n--)
	{
		scanf("%d",&m);
		int result = f(m,2);
		printf("%d\n",result);
	}
}

Output: 1
int f(int n,int min){
	int i,result=1;
	if(n<min)return 0;
	for(i=min;i<n;i++)
		if(n%i==0)result+=f(n/i,i);
	return result;
}
void main()
{
	int cases,a;
	scanf("%d",&cases);
	while(cases--){
		scanf("%d",&a);
		printf("%d\n",f(a,2));
	}
}
Output: 1
int function(int num,int k)
{
int j;
int m=0;
if(num>1)
{for(j=k;j<=num;j++)
{if(num%j==0)
{m=m+function(num/j,j);}

}
return m;
}
else
return 1;
}
int main()
{int i,j;
int n;
cin>>n;
int num[100];

for(i=0;i<n;i++)
{cin>>num[i];}

for(i=0;i<n;i++)
{cout<<function(num[i],2)<<endl;
}

return 0;
}
Output: 3
int disassamble(int, int);
int main()
{
    int n;
    int i = 1;
    int a, result;
    cin >> n;
    while(i <= n)
    {
            i++;
            cin >> a;
            result = disassamble(a, 2);
            cout << result << endl;
    }
    
    return 0;
}
int disassamble(int a, int y)
{
    int i, count = 1;
    if(a == 1)
         return 0;
    if(a == 2)
         return 1;
    for(i = y; i * i <= a; i++)
    {
          if(a % i == 0)
          {
                count = disassamble(a / i, i) + count;
           }
    } 
    return count;
}
Output: 1
int main()
{
int digui(int p,int q); 
int n,i,j;
scanf("%d",&n);
for(i=0;i<n;i++)
{
int a,sum=1;
scanf("%d",&a);
for(j=2;j<a;j++)
{if(j*j>a)
break;
else if(a%j==0)
sum=sum+digui(j,a/j);
}
printf("%d\n",sum);
}
}
int digui(int p,int q)
{
int z=1,d;
if(p==q)
z=1;
else if(p>q)
z=0;
else
for(d=p;d<q;d++)
{if(d*d>q)
break;
else if(q%d==0)
z=z+digui(d,q/d);
}
return(z);
}
Output: 3
int fun(int m,int n)
{
    int i,sum=1;
    if(n==1)
    {
        for(i=2;i*i<=m;i++)
        {
            if(m%i==0)
            sum+=fun(m/i,i);
        }
    }
    else
    for(i=n;i*i<=m;i++)
    {
        if(m%i==0)
        {
            sum+=fun(m/i,i);
        }
    }
    return sum;
}
int main()
{
    int n,i,b;
    int a[1000];
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>b;
        a[i]=fun(b,1);
    }
    for(i=0;i<n;i++)
    cout<<a[i]<<endl;
}

Output: 4
int f(int q,int x)
{
	if(q<x)
	{	int i,k,p,sum;
		k=0;sum=0;p=0;
		for(i=2;i<=x/2;i++)
			if(x%i==0) k=k+1;
		if(k==0) return 1;
		else
		{	for(i=q;i<=sqrt(x);i++)
			  if(x%i==0)sum=sum+f(i,x/i);

			return sum+1;
			p=0;
			sum=0;
		}
	}
	else 
	{	if(q==x) return 1;
		else
		return 0;
	}
}

	


int main()
{
	int n,i,x,sum;
	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
		scanf("%d",&x);
		sum=f(2,x);
		printf("%d\n",sum);
	}
}
Output: 3
int ans;

void dfs(int, int);

int main()
{
	int n, num;
	cin >> n;
	while (n--) {
		cin >> num;
		ans = 0;
		dfs(num, 2);
		cout << ans <<endl;		
	}
	return 0;
}

void dfs(int x, int f)
{
	if (x == 1) {
		++ans;
		return ;
	}
	for (int i = f; i <= x; ++i) 
		if (x % i == 0) 
			dfs(x / i, i);
	return ;
}
Output: 1
int main()
{
  int fj(int m,int min); 
  int t,i,a[100];
  cin>>t;
  for(i=1;i<=t;i++)
     {
       
       cin>>a[i];
       cout<<fj(a[i],2)<<endl;
     }
 
  return 0;
}
   int fj(int m,int min)
{
   int counter=1;
   int i;
   if(m<min)
     return 0;
     for(i=min;i<m;i++)
         if(m%i==0)
         {
           counter=fj(m/i,i)+counter; 
         }
   return counter;
   
}
Output: 2
int Divide(int a,int b);
int main()
{   
    int Times=0;
	int Num=0;
    int i=0;
    int Temp[100]={0};
    cin>>Times;
for (i=0;i<Times;i++)
    { cin>>Num;
	   Temp[i]=Divide(Num,Num);
    }
for (i=0;i<Times;i++)
   {cout<<Temp[i]<<endl;}
return 0;
}


int Divide(int a,int b)
{
	int Sum=0;
	int i=0;
    int Flag=0;
   if (a!=1)
	{ for (i=b;i>1;i--)
     {if (a%i==0)
         Sum+=Divide(a/i,i);
       Flag=1;
     }
    }
   if (Flag==0||a==1)
    {Sum=1;}
return Sum;
}


Output: 3
int t=0,ways;  //??????t?ways
void divide(int x,int h)
{
	int i;
	if(x==1)  //??x==1
	{t++;ways=t;}  //t+1?ways?????t
	else
		for(i=h;i<=x;i++)
			if(x%i==0)
				{h=i;
				divide(x/h,h);  //h?????????????divide?????????
				}
}
int main()
{
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	{cin>>a[i];
	t=0;divide(a[i],2);
	cout<<ways<<endl;}
	return 0;
}
Output: 2
int m,n,num;

void dfs(int i,int j)
{
	int x;

	if (i==1)
	{
		num++;
		return;
	}
	for (x=j;x<=i;x++)
		if (i%x==0)
        dfs(i/x,x);
}

int main()
{
    cin>>m;
    while(m>0){
        num=0;
        cin>>n;
	dfs(n,2);
        cout<<num<<endl;
	m--;
     }
}
Output: 1
/*
 * fenjieyinshi1.cpp
 *???????
 *  Created on: 2011-12-1
 *??:???
 */
int remember=0;//???????????0
int number(int const1,int a)//?????
{
	if(a==1)//??????1??????????????
	{
		remember++;//
		return 1;//??=1
	}
	else
	{
	for(int i=const1;i<=a;i++)//????1??????????
	{
		if(a%i==0)//??????????
		number(i,a/i);//?????????
	}
	}
}
int main()
{
	int n;
	cin>>n;//?????????
	int cases[n];//??????????
	for(int j=0;j<n;j++)
		cin>>cases[j];//???????
	for(int j=0;j<n;j++)
	{
		number(2,cases[j]);//????
		cout<<remember<<endl;//????
		remember=0;//?????????
	}
	return 0;
}
Output: 3
int num=0;
int sum(int a,int i)
{
	
	if(a==1)
	{
		num++;
	}
	else
	{
		while(i<=a)
		{
			if(a%i==0)
			{
				sum(a/i,i);
			}
			i++;
		}
	}
	return num;
}
int main()
{
	int a,t,j,i,count;
	cin>>t;
	for(j=0;j<t;j++)
	{
		count=1;
		cin>>a;
		i=2;
		while(i<=(a/2))
		{
			if(a%i==0)
			{
				num=0;
				sum(a/i,i);
				count=count+num;
			}
			i++;
		}
		cout<<count<<endl;
	}
	
	return 0;
}





       
      
    
Output: 1
int b[40000]={0};
void zhishu(int n)
{
     int i,j;
     for(i=2;i<sqrt(n);i++)
     {
                     for (j=2;j<n/i+1;j++)
                     {
                         b[i*j]=1;
                     }
     }
}
int fenjie(int n,int m)
{
    int s=0,i;
    if (n<m) return 0;
    if (n==m||b[n]==0) return 1;
    for (i=m;i<n;i++)
    {
        if (n%i==0)
        {
                  s=s+fenjie(n/i,i);
        }
    }
    return s+1;
}
int main()
{
    int n,i,max=0,a[1000];
    cin>>n;
    for (i=0;i<n;i++) 
    {
        cin>>a[i];
        if (a[i]>max) max=a[i];
    }
    zhishu(max);
    for (i=0;i<n;i++) cout<<fenjie(a[i],2)<<endl;
    return 0;
}

Output: 5
int calc(int p,int t);

int main()
{
	int  m,n,ans;


	scanf("%d",&m);

	while (m--)
	{
		scanf("%d",&n);
		ans=calc(2,n);
		printf("%d\n",ans);   
	}


	return 0;

}

int calc(int p,int t)
{
	int i,a;
	
	a=1;
	for (i=p;i<=sqrt(t);i++)
		if (t%i==0) 
			a=a+calc(i,t/i);
	return a;
	
}
Output: 1
/*
 * wanyi.cpp
 *
 *  Created on: 2012-11-20
 *      Author: 7
 */
int t=1;
void fen(int n,int i)
{
	for(i=i;i*i<=n;i++)
	{
		if(n%i==0)
		{
			fen(n/i,i);
			t++;
		}
	}
}
int main()
{
	int k;
	cin>>k;
	while(k--)
	{
		int n;
		cin>>n;
		t=1;
		fen(n,2);
		cout<<t<<endl;
	}
}

Output: 1
int factors(int n,int min)
{
     int varieties=0,i;
     if(n==1)  return 1;
     else
     {
            for(i=min;i<=n;i++)
            {
                if(n%i==0)
                {
                    varieties+=factors(n/i,i);
                }
            }
        }
        return varieties;
}
int main()
{
    int n;
    cin>>n;
    int a[n],b[n];
    int i;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        b[i]=factors(a[i],2);
    }
    for(i=0;i<n;i++)
    cout<<b[i]<<endl;
    return 0;
}

Output: 3
/*
 * h35.cpp
 * function:????
 * Created on: 2012-11-30
 * Author: sear
 */
//m????n???????????n???n??m,????n,???n??1
int f(int m, int n) {			//m???,n????????
	int i, sum = 0;				//i?????,sum???????
	if (n == 1)
		return 1;				//???????1???1
	for (sum = 0, i = m; i <= n; i++)//?????????????????m???????m???
		if (n % i == 0)
			sum += f(i, n / i);//?n???????????n??i????
	return sum;					//??sum???????
}
int main() {
	int i, n, k;				//i?????,n????????,k?????????
	for (i = 0, cin >> n; i < n; i++) {
		cin >> k;				//???????
		cout << f(2, k) << endl;//???????
	}
	return 0;				//????
}

Output: 2
int sum=0; //??????sum????????
int yueshu[100]={0}; 
int s=0;

void number(int num,int s)
{
	int i;
	for(i=s;i>=0;i--)
	{
		if(num<yueshu[i])
			continue;
		if(num==yueshu[i])
			sum++;
		else if(num>yueshu[i]&&num%yueshu[i]==0)
			number(num/yueshu[i],i);
	}
}

int main()
{
	int n=0;
	cin>>n;
	int num=0;
	while(cin>>num)
	{
		int i=0,j=0;
		for(i=2;i<=num;i++)
			if(num%i==0)
			{
				yueshu[j]=i;
				j++;
			}
		s=j-1;
		number(num,s);
		cout<<sum<<endl;
		sum=0;
	}
	return 0;
}
Output: 2
int count;

void f(int n, int min) {
int i;
if (n == min) { count++; return;}
if (n % min!=0) { return;}
for (i = min; i <= n; i++)
f(n/min, i);
}


int main() {
int N,i,num,j;
scanf("%d",&num);
for(j=1;j<=num;j++){
count = 0;
scanf("%d",&N);
for (i = 2; i <= N;i++)
f(N, i);
printf("%d\n",count);
}
return 0;
}

Output: 3
int is_bottom,max;
int div_foo(int n,int min);

int main(){

  int N;
  cin>>N;
  for(int index=0;index<N;index++){
    int k;
    cin>>k;
    is_bottom=0;
    cout<<div_foo(k,2)+1<<endl;
  }
  
  return 0;
}

int div_foo(int n,int min){
  int cal=0;

  for(int iter=min;iter<=sqrt(n);iter++){
    if(!(n%iter)){
      cal++;
      int f1=n/iter,f2=iter,g;
      g=div_foo(f1,f2);
      cal+=g;
    }
  }
  return cal;
}

Output: 2
/**
* @author ??
* @date 2010-12-1
* @description
* ??????:???? 
*/
int sum;
void calculate(int, int);


int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n;i++)
	{
		int m;
		sum  = 1;
		cin >> m;
		calculate(m, 2);
		cout << sum << endl;
	}
	return 0;
}
void calculate(int m,int begin)
{
	int i;
	int n = sqrt((double)m);
	for ( i = begin; i <= n; i++ )
	{
		if ( m % i == 0)
		{
			sum++;
			calculate(m / i,i);
		}
	}
}
Output: 2
int function(int n,int a)
{
	int kind=0;
	int i;
	if(n==1)
	return 1;
	for(i=a;i<=n;i++)
	{
		if(n%i==0)
		{
			if(n/i<i&&i!=n);
			else
			{
				kind=kind+function(n/i,i);
			}
		}
	}
	return kind;
}

int main()
{
	int m,n,i,sum;
	cin>>m;
	for(i=1;i<=m;i++)
	{
		cin>>n;
		sum=function(n,2);
		cout<<sum<<endl;
	}
	return 0;
}
Output: 2
int main()
{
	int ys(int s,int p);
	int n,m,i,t;
	scanf("%d",&n);
    for(i=1;i<=n;i++)
	{
		scanf("%d",&m);
        t=ys(m,2);
		printf("%d\n",t);
	}
    return 0;
}
int ys(int s,int p)
{
	int j,a=1,b;
	for(j=p;j*j<=s;j++)
	{
        if(s%j==0)
		{
			b=s/j;
			a=a+ys(b,j);
		}
	}
	return(a);
}
Output: 2
int sum=0,t;          //sum?????????,t??????
void dg(int s)        //?s????
{
	for(int i=s;i<=t;i++)
	{
		if(t%i==0)   //?i??t??
		{
			t=t/i;
			if(t==1) sum++;   //t????,??+1
			else dg(i);       //??????
			t=t*i;
		}
	}
}
int main()
{
	int n;
	cin>>n;
	while(n--)       //??n?
	{
		cin>>t;
		dg(2);
		cout<<sum<<endl;
		sum=0;
	}
	return 0;
}
Output: 1
int n,m;
int sum(int x,int y)
{
   int c,i;
   if(x>sqrt(y))
       c=0; 
   else
   {
       if(y%x==0)
       {
           for(i=x,c=1;i<=(y/2)+1;i++)
           {
               if((y/x)%i==0)
                   c=c+sum(i,(y/x));
           }
       }
       else
           c=0;
   } 
   return(c);
}
main()
{
    int i,k,j;
    scanf("%d",&n);
    for(j=1;j<=n;j++)
    {
        k=0;
        scanf("%d",&m);
        for(i=2;i<=(m/2)+1;i++)
            k=k+sum(i,m);
            printf("%d\n",k+1);   
    }
    }
    
Output: 3
int f(int m,int n)//?????
{
	if(m<n||m/n==1)//?????????2?????0
		return 0;
	if((m%n==0)&&m/n>=n)//?m???n??m/n?????n
		return f(m/n,n)+f(m,n+1)+1;
	else//??????
		return f(m,n+1);

}
int main()
{
	int q,i;
	cin>>q;
	for(i=1;i<=q;i++)
	{
	int p;
	cin>>p;
	cout<<f(p,2)+1<<endl;//?1?????????????
	}
	return 0;//????
}

Output: 1
//*************************************
//* ????1.cpp *
//* ??????1200012844 *
//* ?????2012?11?28? *
//* ????????? *
//**************************************
int factor(int, int);
int main()
{
	int n, i, a;
	cin >> n;//n???
	for ( i = 0; i < n; i ++ )
	{
		cin >> a;//?????
		cout << factor(a, 2) << endl;//??????
	}
	return 0;
}

int factor(int a, int b)
{
	int c, i;
	int num = 1;//???????
	if (a == 1)
		return 0;
	c = sqrt(a);
	for ( i = b; i <= c; i++ )//?2??????????????????
		if ( a % i == 0 )//??????i?????
			num += factor(a / i, i);
	return num;
}
Output: 2
int sum=0;

void f(int x, int i)
{
	double m=sqrt(x);
	if(i<m)
	{
	if(x%i==0)
	{
		sum++;
		f(x/i,i);
	}
	f(x,i+1);
	}

	if(fabs(i-m)<0.00000001)
		sum++;



}


int main()
{
	int x,i,n;
	scanf("%d",&n);

	for(i=0;i<n;i++)
	{scanf("%d",&x);
	sum=0;
	f(x,2);

	printf("%d\n",sum+1);
	}
	return 0;

}

Output: 1
int sum=0;                          //?????????????
void ways(int a,int last);            
int main()
{
	int n,num[100],i;                    
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>num[i];
	}
	for(i=0;i<n;i++)
	{
		ways(num[i],2);               //??????????
		cout<<sum<<endl;             //??
		sum=0;
	}
	return 0;
}
void ways(int a,int last)    
{
	int i,j;
	for(i=last;i<=a;i++)
	{
		if(a<i)                     //????????????????????????
		{
		}
		else if(a==i)               //???????????u?????
		{
			sum++;
		}
		else if(a%i==0)            //????????????????????????????????
		{
			ways(a/i,i);
		}
	}
}

Output: 3
int f(int a,int min);
int main()
{
	int n,i,a;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>a;
		printf("%d\n",f(a,2));}
	return 0;
}
int f(int a,int min)
{ 
	if(a < min){ 
		return 0;} 
	int result = 1; 
	for(int i = min;i<a;i++){ 
		if(a % i == 0){ 
			result += f(a/i,i);}} 
	return result; 
} 
Output: 2
int divide(int n,int j)
{
	int sum=1,i,s,p,k;
	s=sqrt(n);
	for(i=j;i<=s;i++)
	{
		if (n%i==0)
		{
			p=n/i;
            k=i;
			sum=sum+divide(p,i);
		}
	}
	return sum;
}
int main()
{
	int n;
	cin>>n;
	int k,m,p;
	for(k=0;k<n;k++)
	{
		cin>>m;
		p=divide(m,2);
		cout<<p<<endl;
	}
	return 0;
}




		
Output: 2
int times;
int move(int a,int num)//a??????
{int i;
	if(num==1)
		times++;
   for(i=2;i<=num;i++)
	   if(num%i==0&&i>=a)
		   move(i,num/i);
   return times;
}
int main()
{
int n,i;
cin>>n;
int a[n];
for(i=0;i<n;i++)
	cin>>a[i];
int b[n];//??????
for(i=0;i<n;i++)
	{times=0;
	b[i]=move(1,a[i]);}
for(i=0;i<n;i++)
	cout<<b[i]<<endl;
return 0;
}
Output: 4
int factor(int a,int min){
    int i,result=1;
    if(a<min) return 0;
    for(i=min;i<a;i++){
                       if(a%i==0)
                       result+=factor(a/i,i);
                       }
    return result; 
} 

int main(){
    int n,i,a[100];
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     scanf("%d",&a[i]);
                     a[i]=factor(a[i],2);
                     }
    for(i=0;i<n;i++){
                     if(i==n-1) printf("%d",a[i]);
                     else printf("%d\n",a[i]);
                     }
    return 0;
} 
Output: 3
int f(int a,int min)
{ 
  if(a < min)
  { 
    return 0; 
  } 
  
  int r= 1; 
  for(int i = min;i<a;i++)
  { 
    if(a%i == 0)
    { 
         r+= f(a/i,i); 
    } 
  } 
  
    return r; 
} 

main()
{
      int n,a,i,j=0,k,m=0,r=0;
      scanf("%d",&n);
      
      for(k=0;k<n;k++)
      {
          scanf("%d",&a);
          
          if(k!=n-1)                                                               
           printf("%d\n",f(a,2));
           else
           printf("%d",f(a,2));                           
                                      
                     
                      
      }              
                     
                      
                      }
Output: 2
int sum = 0;
void f(int a,int s)
{
	int i;
	if(a == 1)
		sum++;
	else
	{

		for(i = s; i <= a; i++)
		{
			if(a % i == 0)
				f((a / i),i);
		}
	}
	return;
}


int main()
{
	int n, num, j;
	cin >> n;
	for (j = 1; j <= n; j++)
	{
		cin >> num;
		f(num,2);
		printf("%d\n",sum);
		sum = 0;
	
	}
	return 0;
}

Output: 2
void factor(int a, int k);
int sum = 0;
int main()
{
	int n, a, i = 0;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> a;
		factor(a, 2);
		cout << sum + 1 << endl;
		sum = 0;
	}
	return 0;
}

void factor(int a, int k)
{
	int b, j;
	b = (int)sqrt((double)a);
	for (j = k; j <= b; j++)
	{
		if (a % j == 0)
		{
			sum++;
			factor(a / j, j);
		}
	}
	j = k;
}




Output: 2
int prime(int min,int num)
{
	int i;
	for(i=min;i<num;i++)
	{
		if(num%i==0)
			return 0;
	}
 return 1;
}
int count(int min,int num)
{
	int i=0,n=1;
	if(prime(min,num))
		return 1;
	else
		for(i=min;i<num;i++)
		{
			if(num%i==0&&i<=num/i)
			{
				n=n+count(i,num/i);	
			}
		}
	return n;
}
int main()
{
	int num,n,i;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>num;
		cout<<count(2,num)<<endl;
	}
	return 0;
	
}

Output: 3
int division(int m,int k)
{
	int num=0;
	if(m>=k)
	{
		for(int i=k;i<=m;i++)
		{
			if(m==i) num++;
			else if(m%i==0)
			{
				num+=division(m/i,i);
			}
		}
	}
	return num;
}

int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		int a;
		cin>>a;
		cout<<division(a,2)<<endl;
	}
	return 0;
}


Output: 2
int main()
{
	int f(int a,int b);
	int n,a;

	cin>>n;
	while(n>0)
	{
		cin>>a;
		cout<<f(a,2)<<endl;
	n--;
	}
return 0;
}

int f(int a,int b)
{
	int i;
	int s=1;

	if(a<b)
		return 0;
	for(i=b;i<a;i++)
	{
		if(a%i==0)
			s=s+f(a/i,i);
	}
		return s;
}
Output: 1
int numcount=0;
void divide(int num,int x)
{
	int i;
	if(num==1)
		numcount++;
	for(i=x;i<=num;i++)
	{
		if(num%i==0)
			divide(num/i,i);
	}
}

int main()
{
	int n,num,i;
	int first=2;
	int ans[100];
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>num;
		divide(num,first);
		ans[i]=numcount;
		//cout<<count<<endl;
		numcount=0;
	}
	for(i=1;i<=n;i++)
		cout<<ans[i]<<endl;
	return 0;
}

Output: 3
int yinshu[10000];
int j=0;
int temp=0;
int main()
{
    void fenjie(int j,int sum);
    int t,n[10000],i;
    cin>>t;
    for(i=0;i<10000;i++)
    {
        yinshu[i]=0;
    }
    for(i=0;i<t;i++)
    {
        cin>>n[i];
    }
    for(i=0;i<t;i++)
    {
        fenjie(1,n[i]);
        cout<<temp<<endl;
        temp=0;
    }
    return 0;
}
void fenjie(int j,int sum)
{
    for(int i=2;i<=sum;i++)
    {
        if(sum%i==0&&yinshu[j-1]<=i)
        {
            yinshu[j]=i;
            if(sum==i)
            {
                temp++;
            }
            else
            {
                fenjie(j+1,sum/i);
            }
        }
    }
}

Output: 4
int s=0;
void f(int x,int y)
{
	int i,j,k;
	if(x==1)
		s++;
	else
	{
		for(;y<=x;y++)
		{
			if(x%y==0)
			{
				f(x/y,y);
			}
		}
	}
}
int main()
{
	int n,k,q,j;
	scanf("%d",&q);
	for(j=0;j<q;j++)
	{
		scanf("%d",&n);
		f(n,2);
		printf("%d\n",s);
		s=0;
	}
	return 0;
} 
Output: 2
int f(int a,int b);

int main()
{
	int n,c[100],i,a,sum;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&c[i]);
	}

	for(i=1;i<=n;i++)
	{
		a=c[i];
		sum=f(a,2);
		printf("%d\n",sum);
	}
	return 0;
}


int f(int a,int b)
{
	int sum=1;
	int i;
	if(a<b)
		return 0;
	for(i=b;i<a;i++)
	{
		if(a%i!=0)
			continue;
		else
			sum=sum+f(a/i,i);
	}
	return sum;
}






Output: 3
int f(int N, int min)
{
	int s=1, i;
	if(N < min)
		return 0;
	for(i = min; i < N; i++ )
	{
		if(N%i==0)
		{
			s += f(N/i, i);
		}
	}
	return s;
}

int main()
{
	int n, i, b = 2;
	int a[100];
	scanf("%d", &n);
	for(i = 0; i < n; i++)
		scanf("%d", &a[i]);
	for(i = 0; i < n; i++)
		printf("%d\n", f(a[i], b));
	return 0;
}
Output: 3
int c[1000]={0},d[1000],j;
main()
{
	void f();
	int i,s;
	scanf("%d",&s);
	for(j=0;j<s;j++)
	{
		scanf("%d",&d[j]);
	    for(i=2;i<=sqrt(d[j]);i++)
		{
		    if(d[j]%i==0)
			{
			    c[j]++;
			    f(i,d[j]/i);
			}
		}
	}
	for(j=0;j<s;j++)
	{
		printf("%d\n",c[j]+1);
	}
}
void f(int s,int m)
{
	int k;
	for(k=s;k<=sqrt(m);k++)
	{
		if(m%k==0)
		{
			c[j]++;
			f(k,m/k);
		}
	}
}

Output: 4
int f(int,int);
int main()
{
	int n,i,a,b[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		b[i]=f(a,2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",b[i]);
	}
	return 0;
}
int f(int x,int y)
{
	int j,sum=1;
	if(x<y)
		sum=0;
	else
	{
		for(j=y;j<x;j++)
		{
			if(x%j==0)
				sum=sum+f(x/j,j);
		}
	}
	return sum;
}

Output: 3
int factoring(int a,int b)
{
    int i,kind=0;

		//printf("ok  a=%d  b=%d\n",a,b);

	if(a==1)
	{
	    kind=1;
			//printf("kind=1   ok\n");
	}

	else
	{
	    for(i=b;i<=a;i++)
		{
		//	printf("ok\n");

		    if(a%i==0)
			{
	            kind=factoring(a/i,i)+kind;
					//printf("ok  %d\n",kind);
			}
		}
	}


	return kind;
}

int main()
{
   int n,x[40000],i;
   scanf("%d",&n);
  
   for(i=0;i<n;i++)
   {
      scanf("%d",&x[i]);

   }

   for(i=0;i<n;i++)
   {
       x[i]=factoring(x[i],2);
	   printf("%d\n",x[i]);

   }
   return 0;

}
Output: 3
int main()
{
	int fenjie(int m,int i);
	int n,i,c[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&c[i]);
	for(i=0;i<n;i++)
		printf("%d\n",fenjie(c[i],2));
	
	
	return 0;
}

int fenjie(int m,int i)
{
 int l = 1,j;
 int t = sqrt((float)m);
 for (j = i; j <= t; ++j)
 {
  if (m % j == 0)
   l += fenjie(m/j, j);
 }
  return l;
}
Output: 3
int count;
void fun(int m,int n)
{   if(m <=sqrt(n)){
    for (int a=m;a <=sqrt(n);a++)
	{
	if(n%a==0){
		count ++; fun (a,n/a);}
	else count=count; 
	}}
	else count=count; 
 } 
main()
{
	int n;scanf("%d",&n);
	for (int i =0;i<n;i++)
	{
		count=0; 
		int num;scanf("%d",&num);
		for(int j=2;j<=sqrt(num);j++)
		{
			if(num%j==0)
			{count ++; fun(j,num/j);}
		}
		printf ("%d\n",count+1); 
	}}
Output: 3
/*
 * fenjie.cpp
 *
 *  Created on: 2010-11-28
 *      Author: ???
 *      function: ????
 */
int solutionNumber(int a,int k){//??????????????
	int i;
	if(a==1) return 1;
	if(k>a) return 0;
	for(i=k;i<=a;i++)
	    if(a%i==0) return solutionNumber(a,i+1)+solutionNumber(a/i,i);
}
int main()
{
	int n,a[101];
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];//??????
		cout<<solutionNumber(a[i],2)<<endl;//????????????
	}
	return 0;
}



Output: 2
int i,n,k;

int work(int p,int n)
{
	if (n==1) k++;
	for (int i=p;i<=n;i++)
		if (n%i==0) work(i,n/i);
}
int main()
{
	int m;
	cin>>m;
	while (m>0)
		{
     cin>>n;
     k=0;
     work(2,n);
					cout<<k<<endl;
					m--;
		}
	return 0;
}

Output: 1
main()
{
	int find(int m,int k);
	int n,y,d,c;
	scanf("%d",&c);
	for(d=0;d<c;d++)
	{
	scanf("%d",&n);
	y=find(n,1)	;
	printf("%d\n",y);
}
}
int find(int m,int k)
{
	int i,t=1,n=0,x=0,a,s=0;
	for(i=2;i<=m;i++)
	{
		if(m%i==0)n++;
	}
	if(n==1||m==1)return 1;
	else
  {
	for(i=2;i<=m;i++)
	{
		if(m%i==0&&m/i>=i&&i>=k)
		{
			 
			k=i;
			t=t+find(m/i,k);
	 
		}
		
	}
   }
	
	return t;
}
Output: 3
//*************************************************************************
//*????????? *****************************************************
//*??????? 1200012979 **********************************************
//*???2012.11.27 *******************************************************
//*************************************************************************
void breakup(int, int);
int sum;
int main ()
{
	int n, x, count=0;
	cin >> n ;                           //??????
	while( count < n )
	{
		sum = 0 ;
		count++ ;                        //?????
		cin >> x ;                       //??????
        if(x > 3) 
		    breakup(x, 2);                      //????
		cout << sum+1 << endl;           //???????????
	}
	return 0;
}

void breakup( int x, int j )
{
    int i, p, m;
	m = x;                              //???????
	p = sqrt( (double)x ) ;             //p??????????
	for( i = j ; i <= p ; i++ )
       if (m % i == 0 )                 //????????????????
	   {
		   sum++ ;                      //??????
		   x = m / i ;
		   breakup(x, i) ;
	   }
	return ;
}
Output: 1
int sum(int a,int i)
{
	int ret=1;
	for(;i<=sqrt((float)a);i++)
	{
		if(a%i==0)
		{
			ret+=sum(a/i,i);
		}
	}
	return ret;
}
int main()
{
	int t,a,j;
	cin>>t;
	
	for(j=0;j<t;j++)
	{
		cin>>a;
		cout<<sum(a,2)<<endl;
	}
	return 0;
}
Output: 2
int fj(int n,int m)
{
	int i,j,k=0;
	if(n==1) return 1;
	for(i=m;i<=n;i++)
	{
		if(n%i==0)
		k+=fj(n/i,i);
	}
	return k;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	for(;n>0;n--)
	{
		scanf("%d",&i);
		printf("%d",fj(i,2));
		if(n-1) printf("\n");
	}
}
Output: 2
//????

//?????
int ana(int n,int p)
{
	int i;
	int t,s=1;
	t=pow(n,0.5);
	for(i=p;i<=t;i++)
		if(n%i==0)
			s=s+ana(n/i,i);//??
	return s;
}
//???
int main()
{
	int n;
	int a[100];
	int i;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n;i++)
		cout<<ana(a[i],2)<<endl;//????
	return 0;
}

Output: 3
// ????2.cpp : ??????????????
//


void out( int,int );

int t = 1;


int main()
{
	int n = 0;
	int i = 0;
	double sum = 0;
	cin >> n;

	for( i = 1;i <= n;i++ )
	{
		cin >> sum;
		out(sum,2.0);
		cout << t << endl;
		t = 1;
	}

	cin >> i;

	return 0;
}

void out(int sum,int q )
{
		int num = 0;
		double m = sum;
		num = sqrt(m);
		if( sum % q == 0 && q <= num )
		{
			t++;
			out( sum / q,q );
			out( sum,q + 1 );
		}
		if( sum % q != 0 && q <= num )
			out( sum,q + 1);
}





Output: 1
int f(int m,int min);
int main()
{
	int n,m,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		printf("%d\n",f(m,2));
	}
	return 0;
}
int f(int m,int min)
{
	int count=1,i;
	if(m==1)
		return 1;
	else if(m == 2)
		return 1;
	else
	{
		for(i=min;i<=sqrt(m);i++)
		{
			if(m%i==0)
			{
				count += f(m/i,i);
			}
		}
		return count;
	}
}
Output: 2
int wtf(int p,int a);
int main()
{
int n,i,a,p;
scanf("%d",&n);
for(i=0;i<n;i++)
{
  scanf("%d",&a); 
  printf("%d\n",wtf(2,a));                  
}    
return 0;    
}

int wtf(int p,int a)
{  
    int i,ways=0,j=0; 
    int m=(int)sqrt(a);        
    for(;p<=m;p++)    
        {if(a%p==0 && a>=p*p )    {ways=ways+wtf(p,a/p);j++;}}     
    if(j==0)
    return 1;
    else 
    return ways+1;
}

Output: 2
/*
 * 1000012739_34_1.cpp
 *
 *  Created on: 2010-12-3
 *      Author: ???
 *		Title: 1090 ????
 */



int cnt=0;		//????????

void slv(int nm,int pr)		//nm????????pr???????
{
	int i;
	if (nm>=pr)		//???????????
	{
		cnt++;		//??????
		if (pr==1)	//???????????2??
			pr++;
		for (i=pr;i<=nm;i++)	//??????
		{
			if (nm%i==0)		//??nm???
			{
				slv(nm/i,i);	//nm??i???
			}
		}
	}
}

int main()
{
	int n,i,num;
	cin>>n;		//??????
	for (i=1;i<=n;i++)
	{
		cnt=0;		//???????
		cin>>num;	//????
		slv(num,1);	//??cnt
		cout<<cnt<<endl;		//??cnt
	}
}
Output: 2
int t,m,n,i,j,k,xx,x1,x2,x,y,s,n0;


void init(int a[],int b[])
{    freopen("tt.in","r",stdin);
     scanf("%d%d",&m,&n);
	 for (i=1;i<=m;i++) 
		 
			 scanf("%d",&a[i]);
	 for (i=1;i<=n;i++) 
		 
			 scanf("%d",&b[i]);
			 
	 }

void output(int a[],int k)
{
 int i;
	freopen("tt.out","w",stdout);
	for(i=1;i<=k;i++) if (i==1) printf("%d",a[i]); else printf(" %d",a[i]);
}
 void proce(int n,int b)
{
	int i;
	if (n==1) s++;
	else 
	for (i=b;i<=n0;i++)
		if (!(n%i)) proce(n/i,i);
	
}
	
int main()
{
//freopen("tt.in","r",stdin);
//freopen("tt.out","w",stdout);
	scanf("%d",&n);
	
	for (i=1; i<=n;i++) 
		{
			scanf("%d",&x);
			s=0;
			n0=x;
			proce(x,2);
			printf("%d\n",s);
	     }
	
	 
return 0;
}
Output: 5
int f(int a,int b)
{
	int i,p,q;
	for(i=b,p=0;i<=sqrt(a);i++)
	{
        if(a%i==0) 
		{
			q=f(a/i,i);
			p=p+q;
		}
	}
	p++;
	return(p);
}
void main()
{
	int i,a,n,k;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a);
		k=f(a,2);
		printf("%d\n",k);
	}

}
Output: 2
/*
 * 35_1.cpp
 *????????????
 *  Created on: 2010-12-3
 *      Author: 1000012877
 */
int n,sum;//?????n??????????sum????????
int fenjie(int min,int max)//??????????????????????????min???max?????
{ int i;//????????????????
for (i=min;i<=sqrt(max);i++){//i ?????????????
	if (max%i==0&&i<=max/i){
		sum++;//?????????i??????1
		fenjie(i,max/i);}//???????????max??????????
if(i>max/i) break;}
return sum;
}
int main() {
	int i,k;
cin>>k;//k?????????
for (i=0;i<k;i++) {
	cin>>n;
	sum=1;//??????????1
    sum=fenjie(2,n);//?????????
	cout<<sum<<endl; }
return 0; }




Output: 2
int count;

void fun(int i, int j)
{
	int k;
	for(k=i; k<=sqrt(j); k++) {
		if(j%k == 0) {
			count++;
			fun(k,j/k);
		}
	}
}
int main()
{
     int N,turn,c;
      scanf("%d",&turn);
      for(c=1;c<=turn;c++)
      {
	int n,i;
	scanf("%d",&n);
	for(i=2; i<=sqrt(n); i++) {
		if(n%i == 0) {
			count++;
			fun(i,n/i);
		}
	}
	printf("%d\n",count+1);
	count=0;
}

}

Output: 3
//***************************************************
//1.cpp     ????     ******
//?? ???  1200018209  ********
//?? 2012-11-27 ******
//***************************************************

int dispose(int , int);

int main()
{
	int n,i,p;
	cin >> n;
	for(i=0;i<n;i++)
	{
		cin >> p;
		cout << dispose(p,2) << endl;
	}
	return 0;
}

int dispose(int p,int y)
{
	int i,sol=1;                     //?????sol??????
	for(i=y ; i<=(int)(sqrt(p)) ; i++)
	{
		if(p%i==0)
		{
			sol += dispose(p/i,i);           //??????return????????????????
		}
	}
	return sol;
}
Output: 2
int fi(int a,int j);
void main()
{
	int a,n;
	scanf("%d",&n);
	while(n--){
		scanf("%d",&a);
		printf("%d\n",fi(a,2));
	}
}
int fi(int a,int k)
{
	int i,b=1;
	if(a==1)	
		return 0;
	for(i=k;i*i<=a;i++)
		if(a%i==0)
			b=b+fi(a/i,i);
	return b;
}
Output: 1
int fen(int x,int y);

int main(){
	int n,i,m[500];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m[i]);
		printf("%d\n",fen(m[i],2));
	}
	return 0;
}

int fen(int x,int y){
	int j,k;
	int result=1;
	if(x<y)
		return 0;
	for(j=y;j<x;j++)
	{
		if(x%j==0)
		result+=fen(x/j,j);
	}
	return result;
}
Output: 2
/*
 * ????@.cpp
 *
 *  Created on: 2011-11-27
 *      Author: Administrator
 */
int num0;//????
int factor(int x, int y)//?????
{
	int countn = 1;//????????1
	if ( x == 1 )
		return 0;
	if ( x == 2 )
		return 1;//??1,2?????
	for ( int i = y; i <= sqrt(x); i ++)
		if ( x % i == 0 )
			countn += factor(x / i, i);//?????
	return countn;
}
int main()//?????
{//?????
	int n, j;//????
	cin >> n;//????
	for ( j = 1; j <= n; j++)
	{
		cin >> num0;//???????
		cout << factor(num0, 2) << endl;//??????
	}
	return 0;//???????????????????
}//????


Output: 2
int fenjie(int k, int l);
int main()
{
	int n, i;
	cin >> n;
	for(i = 1; i <= n; i++)
	{
		int a;
		cin >> a;
		cout << fenjie(a, 2) << endl;
	}
	return 0;
}

int fenjie(int k, int l)
{
	int num = 1, d, e;
	if(k < l)
	{
		return 0;
	}
	d = (int) (sqrt((double) k));
	for(e = l; e <= d; e++)
	{
		if(k % e == 0)
		{
			num += fenjie(k / e, e);
		}
	}
	return num;
}
Output: 2
/*
 * 1.cpp
 *
 *  Created on: 2010-12-1
 *      Author: ???
 *        ??? ????
 */



int g(int x,int j){
	for(j++;j<=x;j++){
		if(x==j)
			return 1;
		if(x%j==0&&x/j>=j)
			return g(x/j,j-1)+g(x,j);
	}
	return 0;
}

int main(){
	int n,a;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a;
		cout<<g(a,1)<<endl;
	}
	return 0;
}
Output: 2
int fenjie(int n,int min)
{int i,a=0,x=0;
for(i=2;i<=n;i++)
if(n%i==0)
a=a+1;
	if(n==1)
	return 1;
	else
	{
		for(i=min;i<=n;i++)
		{
			if(n%i==0)
			x=x+fenjie(n/i,i);
		}
		return x;
	}
}
main()
{
	int t,j,num;
	scanf("%d",&t);
	for(j=1;j<=t;j++)
	{
		scanf("%d",&num);
		printf("%d\n",fenjie(num,2));}
}
Output: 3
int sum=1;
void f(int i,int j)
{
	int k;
	if(i==1)
	    sum++;
	else
	{
		for(k=j;k<=i;k++)
		{
			if(i%k==0)
				f(i/k,k);
		}
	} 
}
int main(void)
{
	int i,j,k;
	int n;
	int a;
	scanf("%d",&n);
	while(n--)
	{
		sum=1;
		scanf("%d",&a);
		for(i=2;i*i<=a;i++)
		{
			if(a%i==0)
			{
				f(a/i,i);
			}
		}
		printf("%d\n",sum);
	}
	return 0;
}
Output: 2
int main()
{
	int fun(int m,int n);
	int n,i,sum;
	scanf("%d",&n);
	int *p;
	p=(int *)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	scanf("%d",&p[i]);
	for(i=0;i<n;i++)
	{
		sum=0;
	sum=fun(p[i],1);
	printf("%d\n",sum);
	}
	free(p);
}
int fun(int m,int n)
{
	int i,sum=1;
	if(n==1)
	{
		for(i=2;i*i<=m;i++)
		{
			if(m%i==0)
			sum=sum+fun(m/i,i);
		}
	}
	else
	{
		for(i=n;i*i<=m;i++)
		{
			if(m%i==0)
			sum=sum+fun(m/i,i);
		}
	}
	return sum;
}
Output: 4
int sum[50];
int i;

int main()
{
	void digui(int x, int y);
	int n;
	int j[50],m[50];


	scanf("%d",&n);

	for(i=0;i<n;i++)
	{	
		scanf("%d",&m[i]);
		sum[i]=0;
		for (j[i]=2;j[i]*j[i]<=m[i];j[i]++)
		{
			if(m[i]%j[i]==0)
			{
				sum[i]++;
				digui(j[i],m[i]/j[i]);
			}
		}
		printf("%d\n",sum[i]+1);
	}

	return 0;
}

void digui(int x, int y)
{
	int s;
	for(s=x; s*s<=y; s++) 
	{
		if(y%s==0) 
		{
			sum[i]++;
			digui(s,y/s);
		}
	}
}

Output: 3
int a=1;
int yinzi(int j,int  n)
{   
    for(int i=j;i<n;i++)
	{
		if(n%i==0&&n!=i&&n/i>=i)
			{  
			    a++;
				yinzi(i,n/i);
			}
		
	}
	return 0;
			
}
int main()
{
	int n,s;
	cin>>s;
	for(int j=0;j<s;j++)
	{
		cin>>n;
		for(int i=2;i<=n;i++)
		{
			if(n%i==0&&n/i>=i)
			{
				a++;
		         yinzi(i,n/i);
			}
		}
	    cout<<a<<endl;
	    a=1;
	}
	return 0;
}
Output: 3
int ge,s,w;//ge??????????? 
void fen(int h,int a);//fen???s?????????? 
int main()
{
    int n=0,k=0;//n????????   k?????????  s????????????? 
    cin>>n;
    for(k=1;k<=n;k++)
    {
       cin>>s;
       ge=0;
       fen(s,2);
       cout<<ge<<endl;                 
    }
return 0;    
}
void fen(int h,int a)
{
    for(int i=2;i<=h;i++)
    {
        if((h%i==0)&&(i>=a))
        {
            if(h/i!=1)
            {fen(h/i,i);}
            else
            {ge++;}           
        }
    }     
}

Output: 2
int f(int a,int min)
{ 
	if(a<min)
	{ 
		return 0; 
	} 
	int result=1,i; 
	for(i=min;i<a;i++)
	{ 
		if(a%i==0)
		{ 
			result+=f(a/i,i); 
		} 
	} 
	return (result); 
} 
int main()
{
    int n,a[100],b[100],i;
	scanf("%d\n",&n);
    for(i=0;i<n;i++)
	{
		scanf("%d\n",&a[i]);
	}
    for(i=0;i<n;i++)
	{
		b[i]=f(a[i],2);
	}
    for(i=0;i<n;i++)
	{printf("%d\n",b[i]);}
	return 0;
}

Output: 4
int f(int x,int y)
{
	int a,n=0;
	for(a=y;a<=sqrt(x);a++)
	{
		if(x%a==0)
		{
			n++;
			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]=1+f(x[i],2);
	}
	for(i=0;i<m;i++)
	{
		printf("%d\n",n[i]);	
	}
	return 0;
}

Output: 3
int f(int q,int x)
{
	if(q<x)
	{	int i,k,p,sum;
		k=0;sum=0;p=0;
		for(i=2;i<=x/2;i++)
			if(x%i==0) k=k+1;
		if(k==0) return 1;
		else
		{	for(i=2;i<=sqrt(x);i++)
			{	if(x%i==0)
				{	if(i<q) continue;
					else sum=sum+f(i,x/i);
				}
			}
			return sum+1;
			p=0;
			sum=0;
		}
	}
	else 
	{	if(q==x) return 1;
		else
		return 0;
	}
}




//???
int main()
{
	int n,i,x,sum,p;
	p=0;
	sum=0;
	scanf("%d",&n);

	for(i=1;i<=n;i++)
	{
		scanf("%d",&x);
		sum=f(2,x);
		printf("%d\n",sum);
	}

	return 0;
}
Output: 3
int t;
int f(int a,int b){
	int i;
    for(i=a;i*i<=b;i++){
        if(b%i==0){
            t++;
            f(i,b/i);
        }
    }
return t;
}
void main()
{
    int n,i,result[1000],a[1000];
    scanf("%d",&n);
	
    for(i=0;i<n;i++){
		t=1;
        scanf("%d",&a[i]);
        result[i]=f(2,a[i]);
       
    }
 for(i=0;i<n;i++)
	printf("%d\n",result[i]);
}


Output: 3
int cal; //??cal
int fac(int a,int x){ //a???????
if(x==1) { cal++; return 1; } //??x?i?? ????????????1
for(int i=2;i<=x;i++)
if(x%i==0&&i>=a) //??? ??????????
fac(i,x/i);}
int main(){
int n,b;
cin>>n;
while(n>0){
cal=0;
cin>>b;
fac(1,b);
cout<<cal<<endl;
n--;
}}
Output: 1
/*
????
??
	?????????????
	f[i,j]????i????j?????????
	??????????
	i?j????N?????O(sqrt(n))???
?????
	?????O(n^(3/2))
	?????O(n)
*/
int main()
{
	int f[200][200] = {0};
	int div[40000] = {0};
	int divth[200] = {0};
	int kase = 0;
	cin >> kase;
	for (; kase > 0; kase --)
	{
		int n = 0;
		cin >> n;
		memset(f,0,sizeof(f));
		memset(div,0,sizeof(div));
		memset(divth,0,sizeof(divth));
		int m = 0;
		for (int i = 1; i <= n; i ++) 
			if (n % i == 0) 
			{
				div[i] = ++m;
				divth[m] = i;
			}
		f[1][1] = 1;
		for (int i = 2; i <= m; i++)
			for (int j = 2; j <= i; j++)
				for (int k = j; k > 1; k--)
					if (divth[i] % divth[k] == 0)
					{
						int ii = divth[i] / divth[k];
						int jj = k;
						if (div[ii] < jj) jj = div[ii];
						f[i][j] += f[div[ii]][jj];
					}
		cout << f[m][m] << endl;
	}
	return 0;
}	
Output: 5
/*
 *  Created on: 2011-11-18
 *      Author: 1100012870
 */

int su[40000],b[10000],ans;

void zhaosushu()
{
	int i,j,p;
	for(i=2;i<32768;i++)
	{
		p=1;
		for(j=2;j<=sqrt(i);j++)
			if(i%j==0){
				p=0;
				break;
			}
		if(p==0)continue;
		su[p]=1;
	}
}

void resolve(int a,int x)
{
	int i;
	if(a==1 || (su[a]==1 && a>=b[x-1])) {
		ans++;
		return;
	}
	for(i=2;i<=a;i++)
		if(a%i==0 && i>=b[x-1]){
			b[x]=i;
			resolve(a/i,x+1);
			b[x]=0;
		}
}

int main()
{
	int n,i,a;
	memset(su,0,sizeof(su));
	zhaosushu();
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		ans=0;
		memset(b,0,sizeof(b));
		resolve(a,1);
		cout<<ans<<endl;
	}
	return 0;
}
Output: 4
int a[1000];
int l=0,x;
int fff(int k,int w,int t,int x);
int main()
{
    int i,j,q,p,n,m,y;
    scanf("%d",&n);
    for(p=0;p<n;p++)
       {q=1;l=0;
        scanf("%d",&x);
        for(i=2;i<=x;i++)
           if(x%i==0)
             {a[q]=i;
             q++;
             }
        fff(1,q-1,1,x);
        printf("%d\n",l,x);
       }
}
int fff(int k,int w,int t,int x)
{
    int i,j,y,n,m,p;
      for(i=t;i<=w;i++)
            {if(x%a[i]==0)
             {
             x=x/a[i]; 
             if(x==1){l++;}
             if(x>1)
                 fff(k+1,w,i,x);
             x=x*a[i];
             }
            }
}

            

Output: 3
int a;
int res;
int sum;
void dfs(int cnt){
    if(cnt*sum==a){res++; return;}
    if(cnt*sum<a){
        sum*=cnt;
        int j=a/sum;
        for(int i=cnt;i<=j;i++)
            dfs(i);
        sum/=cnt;
        return;
    }
}
int main(){
    int nCases;
    scanf("%d",&nCases);
    for(int i=0;i<nCases;i++){
        scanf("%d",&a);
        res=0; sum=1;
        for(int i=2;i<=a;i++)  dfs(i);
        printf("%d\n",res);
    }
    return 0;
}
Output: 3
/*
 * hehe.cpp
 *
 *  Created on: 2012-11-25
 *      Author:??
 * ???????a?????????????????a = a1 * a2 * a3 * ... * an?
 * ??1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
 */

int sum = 1;//??????Sum
int Fact(int x, int y);

int main() {
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		sum = 1;//????sum
		Fact(a, 2);//????
		cout << sum << endl;
	}
	return 0;
}
int Fact(int x, int y) {
	if (x == 1)
		return 0;//???1???0
	else {
		for (; y <= sqrt(x); y++)//????????
			if (x % y == 0) {
				sum = sum + Fact(x / y, y); //????????Fact(??y)
			}
		return 1;
	}

}

Output: 2