semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/**
* @file homework.cpp
* @author ??
* @date 2010?12?03
* @description
* ??????: 1090 ????
*/
void jisuan(int ,int);
int times, sum, i, n;
int main()
{	
	cin >> times;
	for (i=0;i<times;i++)
	{
		sum = 0;
		cin >> n;
		jisuan (n, 2);
		cout << sum << endl;
	}
	return 0;
}
void jisuan(int n, int j)
{
	int i;
	for (i=j;i<=n;i++)
	{
		if (n > 1)
		{
			if (n % i == 0)
			{
				if (n % i != 0 && n > i)
					sum++;
				jisuan (n / i, i);
			}
		}
		if (n == i)
			sum ++;
	}
}
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;
}
int f(int n,int k){
   if(n<k)return 0;
   int i,s=1;
   for(i=k;i<n;i++){
     if(n%i==0)s+=f(n/i,i);
     }
   return s;
}
int main(){
    int m,n,i,ans,s;
    scanf("%d",&m);
    while(m--){
       scanf("%d",&n);
       printf("%d\n",f(n,2)); 
       }
    return 0;
}
int divide(int a,int b)
{
    int i,r;
    r=1;
    for(i=b;i<a;i++)
    {
                    if(((a/i)*i)==a&&(a/i)>=i) r=r+divide(a/i,i);
    }
    return r;
}
int main()
{
    int s,p,n,j;
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
                    scanf("%d",&p);
                    s=divide(p,2);
                    printf("%d\n",s);
    }
}
/*
 * 1.cpp
 *
 *  Created on: 2010-12-1
 *      Author: hanzhe
 */


int min(int a,int b){   //????
	if(a>b)return b;
	else return a;
}
int f(int n,int s){ //???????s?n???????
	int k=0,i;
	if(n==1)return 1;
	else if(s==1)return 0;
	else if(s>n)return f(n,n);
	else {for(i=2;i<=s;i++)
		if(n%i==0)k=k+f(n/i,min(i,s));
	return k;
	}
}
int main(){ //????
	int n,m;
	cin>>n;
	while(n>0){
		cin>>m;
		cout<<f(m,m)<<endl;  //??
		n--;
	}
	return 0;
}  //????
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;
}
int f(int x,int y){//x??????y????????
	if((int)pow(x,0.5)<y)return 1;//??x^0.5???y??1
	int d=1;
	for(int i=y;i<=(int)pow(x,0.5);i++)//??i<=x^0.5,??????
		if((x%i)==0)
			d+=f(x/i,i);//??
	return d;
}
int main(){
    int n,m;
    cin>>n;//??
    for(int k=1;k<=n;k++){
    	cin>>m;
    	cout<<f(m,2)<<endl;//????
    }
	return 0;
}
/*
 * 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;
}
int main()
{
	int f(int,int);
	int n,a;
	cin>>n;
	while(n--)
	{
		cin>>a;
		cout<<f(a,a)<<endl;
	}
	return 0;
}
int f(int m,int k)
{
	int i,sum=0;
	if(m==1) sum=1;
	for(i=m;i>1;i--)
	{  
		if(m%i==0&&i<=k)
			sum+=f(m/i,i);}
	return sum;
}
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;
}
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;
}
int sum=1 ;
int kk(int a,int b)
{
	int i;
	for(i=b;i>=2;i--)
	    if(a%i==0)
			return a/i;
		return 0;
}
int seperate(int a,int b)
{
	int i;
	for(i=b;i>=2;i--)
	{
		if(a%i==0&&(a/i)<=i)
		{sum++;if((a/i)==2)continue;else seperate(a/i,a/i-1);}
		else if((a%i==0)&&((kk(a/i,i))!=0))
		{
			seperate(a/i,i);
		}
		
	}
	return sum;
}
int main()
{
	int n,i,m;
	cin>>n;
	
	for(i=1;i<=n;i++)
	{
		cin>>m;
		cout<<seperate(m,m-1)<<endl;
		sum=1;
	}
	return 0;
}
int main()
{
	int n,i;
	int a,num(int,int);
	
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>a;
		cout<<num(2,a)+1<<endl;
	}	
	return 0;
}

int num(int m,int n)
{
	int i,count=0;
	int su(int);
	for (i=m;i<=(int)sqrt(n);i++)
		if (n%i==0)
		{
			count++;
			if (su(n/i)!=0)
				count+=num(i,n/i);
		}
	return count;
}

int su(int n)
{
	int i;
	for (i=2;i<n;i++)
		if (n%i==0)
		{
			return 1;
			break;
		}
	if (i==n)
		return 0;	
}
int digui(int m,int n,int sum)
{
	int i;
	sum++;
	if(sqrt(m)<n)
		return sum;
	else{
		for(i=n;i<=sqrt(m);i++){
			if(m%i==0)
				sum=digui(m/i,i,sum);
		}
		return sum;
	}
}

void main()
{
	int n,a;
	scanf("%d",&n);
	while(n--){
		scanf("%d",&a);
		printf("%d\n",digui(a,2,0));
	}
}
int minf(int p,int min);
int main(){
	int n,i,k,p,zs[20000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p);
		//for(min=2;min<=(int)sqrt(p);min++){
			//if(p%min==0){
				zs[i]=minf(p,2);
			    //printf("%d\n",minf(p,min));
		//	}			
		//}
		zs[i]++;
	} 
	for(i=0;i<n-1;i++){
		printf("%d\n",zs[i]);
	}
	printf("%d",zs[n-1]);
	//scanf("%d",&n);
    return 0; 
}
int minf(int p, int min){
	int x=0,i;
	i=min;
	for(i;i<=(int)sqrt(p);i++){
		if(p%i==0){
			x+=minf(p/i,i)+1;
		}
	}
	
	return x;
	}
int Factorization(int n,int k){	//????????
	int sum=0;	//??????sum??????????
	if (n<k){	//?????????k
		return 0;	//??0
	}
	if (n%k==0){	//????????k???
		if (n==k){	//?n?k???
			return 1;	//??1
		}
		else{
			sum=sum+Factorization(n,k+1)+Factorization(n/k,k);	//??????????
		}
	}
	else{
		sum=sum+Factorization(n,k+1);	//?????????k????????
	}
	return sum;	//??sum??
}

int main(){	
	int t,i,a;	//???????t???????i??????a???????
	cin>>t;	//????????
	for (i=1;i<=t;i++){	//?????????
		cin>>a;
		cout<<Factorization(a,2)<<endl;
	}
	return 0;
}
int t, a, flag, a1;
/*bool prime(int k)
{
	int j, sqrt_k;
	if (k == 2)
		return 1;
	else
	{
		sqrt_k = sqrt((double)k);
		for (j = 2; j <= sqrt_k; j++)
		{
			if (k % (int)j == 0)
				break;
		}
		if (j == sqrt_k + 1)
			return 1;
		else
			return 0;
	}
}
/*
void find(int m)
{
	int i;
	if (prime(m))
	{
		flag = 1;
		t++;
	//	cout << t << endl;
		return;
	}
	for (i = 2; i <= sqrt((double) m); i++)
	{
		if ((m % i == 0) && (a1 <= i))
		{
		//	cout << a1 << 2<< endl;
			//cout << i <<  " " << 1 <<endl;
			a1 = i;
			//if (!prime(m / i))
				t++;
		//	cout << t << endl;
			find(m / i);
		}
	}
	return;
}*/
void find(int m, int min)
{
	int i;
	//int a[];
	for (i = 2; i <= sqrt((double)m); i++)
	{
		if (m % i == 0)
		{
			if (i >= min)
			//if (a1 >= i)
			{
				t++;
		//	if (!/*((m / i > i) && */(prime(m / i)))
			//	cout << t << " ";
			//	cout <<i<<" " << m / i << " " << t <<endl;
			//	t++;
			//	cout << " " << a1 <<endl;
				//cout << t<<endl;
			//	a1 = i;
				min = i;
				//cout << min << endl;
				find(m / i, min);
				
			}
			
		}
	}
	/*if (i == (int)sqrt((double)m) - 1)
		return;*/
	return;
}
int main()
{
	int n, ii;
	cin >> n;
	for (ii = 1; ii <= n; ii++)
	{
		t = 0;
		flag = 0;
		cin >> a;
	//	if (prime(a)) t--;
		a1 = a;
		find(a, 2);
		cout << t + 1<< endl;
	}

	return 0;
}
int num;

int wrh(int n,int r,int b[200],int y,int a)
{
	int i;
    for( i = y;i <= a/2;i ++ )
	{
		if ( r % i == 0)
		{
			b[n] = i;
			int now = 1,j;
			for ( j = 1;j <= n;j ++ )
				now = now * b[j];
			if ( now == a)
			{
				num ++;
				break;
			}
			if ( now > a) break;
			else 
				wrh(n + 1,r / i,b,i,a);
		}
	}
	return 0;
}

int main()
{
	
    int s,a,b[200];
	cin >> s;
	while (s > 0)
	{
		num = 0;
        cin >> a;
		wrh(1,a,b,2,a);
		cout << num + 1<<endl;
		s --;
	}
	return 0;
}
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;
	
}
int f(int num,int i)
{
	int sum;
	sum=0;
	int j;
		for(j=i;j<=num/2;j++)
		{
			if(num%j==0)
			{
				if(num/j<j)
				{
					sum=sum;
				}else{
					sum=1+sum+f(num/j,j);
				}
			}
		}
	return sum;
}
int main()
{
	int n,num,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&num);
		int j,sum;
		sum=0;
		j=2;
	        	sum+=f(num,j);
		printf("%d\n",sum+1);
	}
	return 0;
}
int f(int a,int x)
{
	int i,j;
	if(x==2)
	return 1;
	
	else
	{
		int result=1;
		for(i=a;i<=x;i++)
		if(x%i==0&&x/i>=i)
		result=result+f(i,x/i);
		return result;
		}
}
main()
{
	int i,j,k;
	int n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		int a;
		scanf("%d",&a);
		printf("%d\n",f(2,a));
		}
	}
/*
 * 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
	}
}
//============================================================================
// Name        : 9.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================


int sum=0;//????sum

void devide(int a,int b)//??
{
	if(a==1)
		sum++;
	else
	{
	    if(a>=b)
		    devide(a,b+1);
	    if(a%b==0)
		    devide(a/b,b);
	}
}

int main()//???
{
	int n,a;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a;
		sum=0;
		devide(a,2);
		cout<<sum<<endl;
	}
	return 0;
}
//**********************
//* ???   ????  *
//* 1200012878 ???  *
//* 12?1?            *
//**********************
int fengjie(int a, int b)
{
	if (a ==2 || a == 3)
		return 1;
	int sum = 1;
	int c = sqrt(a);
	for (int i = b; i <= c; i++)
	{
		if (a % i == 0)
		{
			sum = sum + fengjie(a / i, i);
		}
	}
	return sum;
}
int main()
{
	int n, a;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a;
		cout << fengjie(a, 2) << endl;
	}
	return 0;
}
//
//  main.cpp
//  ?????
//
//  Created by ???? on 13-11-22.
//  Copyright (c) 2013? ????. All rights reserved.
//

int f(int a,int s)//s for start
{
    if(a<=s) return 1;
	int b=sqrt((float)a),flag=0,sum=1;
	for(int i=s;i<=b;i++)
	{
		if(a%i==0)
		{
			flag++;
            
			sum=sum+f(a/i,i);
		}
	}
	if(flag==0) return 1;
	else return sum;
}



int main()
{
	int a,n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		cout<<f(a,2)<<endl;
	}
	
    return 0;
}
//????????
int kind(int num,int min);              //????kind???num???????min?????????
int main()                              //?????
{
	int n;
	int i;
	int num;
	cin>>n;
	for(i=1;i<=n;i++)
	{
	  cin>>num;                        //??????n????????????????????
	  cout<<kind(num,2)<<endl;
	}
return 0;
}                                     //?????
int kind(int num,int min)             //kind????
{
	if(num<min)                      //??num??min??????????min?????????0
	{return 0;}

	int k=1;                         //????????num=num??????????
	int i;
	for(i=min;i<=num;i++)
	{
		if(num%i==0)                  //??????
	   {
		  k=k+kind(num/i,i);          //?k????num?????i???????????????????????????????min?
	   }

    }
	
return k;                            //?????k
}
int a[40000]={0};
void fun(int n,int j,int k){
     int i;
     for(i=j;i<=sqrt(n);i++){
                             if(n%i==0){
                                        j=i;
                                        a[k]++;
                                        fun(n/i,j,k);
                                        }
                             }
                             
     }
      
int main()
{
  int n;
  int m[40000]={0};
  int i;
  scanf("%d",&n);
  for(i=1;i<=n;i++){ scanf("%d",&m[i]);}  
  for(i=1;i<=n;i++){fun(m[i],2,i);}
  for(i=1;i<=n;i++){ printf("%d\n",a[i]+1);} 
 
	
  return 0;
}
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;

}
int f(int n, int min){
	int i, result=1;
	if(min>n)
		return 0;
	for(i=min;i<n;i++){
		if(n%i==0){
			result+=f(n/i,i);
		}
	}
	return result;
}
	
    int main(){
	int n,a,i,t;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a);
		t=f(a,2);
		if(i<n-1)
			printf("%d\n",t);
		else
			printf("%d",t);

	}
	return 0;
	}
int number=0;
int main()
{
	void f(int first,int m);
	int n,i,num;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>num;
		f(2,num);
		cout<<number/2<<endl;
		number=0;
	}
	return 0;
}
void f(int first,int m)
{
	int i;
	for(i=first;i<=m;i++)
	{
		
		if(m%i==0)
		{
			m=m/i; 
			f(i,m);	
			if(m!=1)
			m=m*i;
		
		}
	}
	if(m==1)
		number+=1;  
}
int c = 1;

void fenjie(int a, int k)
{
	if (a == 1) 
	{
		c++;
		return;
	}
	for (int i = k; i <= a; i++)
	{
		if (a % i == 0)
		{
			fenjie(a / i, i);
		}
	}
}

int main()
{
	int n, a;
	cin >> n;
	while (n--)
	{
		c = 0;
		cin >> a;
		fenjie(a, 2);
		cout << c << endl;
	}
	return 0;
}
/*
 * 2.cpp
 *
 *  Created on: 2012-9-14
 *      Author: 12006
 */

int tmp = 2 ;
int suml(int n,int tmp)  //??????
{
	int sum = 0 ;
	if(n==1)
	{
		return 1 ;
	}
	for(int i = tmp ; i <=n ; i++)
	{
		if(n%i==0)
		{
			sum+=suml(n/i,i);


		}
	}
	return sum ;
}
int main()
{
	int m ;
	cin >> m ;
	int n ;
	for(int i = 0 ; i < m ; i++)
	{
		cin >> n ;
		int zon_shu = 0 ;
		zon_shu = suml(n,tmp) ;
		cout << zon_shu <<endl ;
	}
}
int f(int a,int s)
{
   int y=0;
   for (;s<=a;s++)
     {
       if (s==a)
          y+=1;
       else if (s>1&&a%s==0)
          y+=f(a/s,s);
     }
   return y;    
}
main ()
{
     int n,i,a;
     scanf ("%d",&n);
     for (i=0;i<n;i++)
       {
          scanf ("%d",&a);
          printf ("%d\n",f(a,1));
       }
}
int main(){
  int hanshu(int k,int min);
  int n,i,a;
  scanf("%d",&n);
  for(i=0;i<n;i++){
      scanf("%d",&a);
      printf("%d\n",hanshu(a,2));
     }
  scanf("%d",&n);
  return 0;
}
  int hanshu(int k,int min){
      int j,a[k],b=1;
      if(k<min)return 0;
      for(j=min;j<=k/j;j++){
         if(k%j==0){
           b+=hanshu(k/j,j);
           }
         }
      return(b);
     }
int t;
void calc(int a,int d)
{
 int i;
 if (a==1) t++;
   else{
    if (a>=d)
      for (i=d;i<=a;i++)
	if (a%i==0)
	  calc(a/i,i);}
}
void main()
{
 int n,i,a;
 scanf("%d",&n);
 for (i=1;i<=n;i++)
   {
   scanf("%d",&a);
   t=0;
   calc(a,2);
   printf("%d\n",t);
   }
}
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;
}
int f(int a,int min);//???a???????min?????????
int f(int a,int min)
{
if(a < min){
return 0;
}
int result = 1;
for(int i = min;i*i<=a;i++){
if(a % i == 0){
result += f(a/i,i);//???? ??????????a/i?i????????i???????
}
}
return result;
}
int main(){
	int n,k;
	cin>>n;
	while(n>0)
	{
		cin>>k;
		cout<<f(k,2)<<endl;//????
		n--;
	}
}
void factor(int,int);
int result[9999]={0};
int j=0;
int main()
{
	int times,k=1;
	cin>>times;
	while(k<=times){
	int num,ansf=0;
	cin>>num;
	factor(2,num);

	for(int i=0;i<9999;i++)
		if(result[i])ansf++;
	cout<<ansf<<endl;

	for(int i=0;i<9999;i++)
		result[i]=0;

	k++;
	}


	return 0;
}

void factor(int start,int num)
{  
  if(num==1)
     {result[j]=1;j++;}
   
   for(int i=start;i<=num;i++){
	   if(num%i==0)
		   factor(i,num/i);
     }
}
int devide(int n,int m)
{
	if(n<m)
		m=n;
	if(n==1)//?????1?,??1
		return 1;
	int sum=0;
	for(int i=m;i>=2;i--)
	{
		if(n%i==0)
		{
			sum=sum+devide(n/i,i);
		}
		
	}
	return sum;
}

int main()
{
	int n,i,m;
	cin>>n;
	i=0;
	while ( i<n )
	{
		cin>>m;
		cout<<devide (m,m)<<endl;//???????
		i++;
	}
	return 0;

}
int a[1000];
int l=0,x;
int fff(int w,int t);
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(q-1,1);
        printf("%d\n",l);
       }
}
int fff(int w,int t)
{
    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(w,i);
           x=x*a[i];
          }
       }
}
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;
}
//*******************************************************
//*?????????.cpp                               *
//*??????                                         *
//*?????2010?12?9?                              *
//*???????????????                       *
//*?????????????????????????? *
//       ??????????????????????? *
//*******************************************************
int a=2;//????????????
int result =0;//?????????????
void function(int,int);
int main()
{
	int n=0;
	int data=0;
	int i=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>data;
		function(data,a);
		cout<<result<<endl;
		result=0;//??
	}
	return 0;
}
void function(int x,int y)
{
	int j=0;
	if(x==1)//??????1 ????????????
	{
		result=result+1;
	}
	for(j=y;j<=x;j++)//??1
	{
		if(x%j==0)//????????
		{
			function(x/j,j);
		}
	}
}
int kind (int k,int a)
{
   int i,j,temp=0;
   int x;
   for (i=a;i<k;i++)
   {
          if (i<=k/i&&k%i==0)
       {
             
              x=k/i;
            // printf("%d*%d=%d\n",x,i,k);
             temp++;
               for (j=i;j<x;j++)
             {
                  if (j<=x/j&&x%j==0)
                 {
                 temp=temp+kind(x,j);
				 break;
                 }
				 
             }
             
       }
   }

    return (temp);
}
int main ()
{
    int n,i,s,a[32768][2];
    scanf("%d",&n) ;
    for (i=0;i<n;i++)
    {
        scanf("%d",&a[i][0]);
        a[i][1]=kind(a[i][0],2);        
    }
    for (i=0;i<n;i++)
    {
        printf("%d\n",a[i][1]+1);//k=k???? 
    }
    //scanf("%d",&n) ;
       return 0;
}
/*
 * 187.cpp
 *
 *  Created on: 2011-11-22
 *      Author: think
 */
int count(int a,int n){
	if(a>n)return 0;
	if(a==n)return 1;
	int p=1;
	int i;
	for(i=a;i<=n;i++){
		if(n%i==0&&i<=n/i){
			p=p+count(i,n/i);
		}
	}
	return p;
}
int geshu(int N){
	int i;
	int s=1;
	for(i=2;i<=sqrt(N);i++){
		if(N%i==0){
			s=s+count(i,N/i);
		}
	}

	return s;
}
int main(){
	int N;
	cin>>N;
	int c[N];
	int j;
	for(j=0;j<N;j++){
		cin>>c[j];
	}
	for(j=0;j<N;j++){
		cout<<geshu(c[j])<<endl;
	}
	return 0;
}
//????

//?????
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;
}
/*
 * 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;				//????
}
int breakways(int num, int min);
int main()
{
	int n;
	cin >> n;
	int number;
	for (int i = 1; i <= n ; i++)
	{
		cin >> number;
		cout << breakways(number , 2) << endl;
	}
}

int breakways(int num, int min)
{
	int sum = 0;
	for (int j = min ;j <= num ; j++)
	{
		if (num % j == 0)
		{
			if (num != j)
				sum += breakways (num / j , j);
			else
				sum += 1;
		}
	}
	return sum;
}
void fenjie(int);

int solutionnum=1;//????????1???
int main()
{   int n,a,i;
    cin>>n;//????
    for(i=1;i<=n;i++)
        {cin>>a;//??????
        fenjie(a);//???????????
        cout<<solutionnum<<endl;//??
        solutionnum=1;//?????
        }
    return 0;
}
int yinzi[100]={2},i=0;
//yinzi????????????????????????????????????????????????
void fenjie(int x)
    {int j;
       for(j=yinzi[i];j<x;j++)
    	   {if(x%j==0&&x/j>=j)//j?x????????x??j????????j,??????
    		   {i++;  yinzi[i]=j;//?????????????
    		   fenjie(x/j);//?????
    		   j=yinzi[i];  i--;//?????
    		   solutionnum++;}//????+1
    	   }

	}
int sum=0;
void f(int n,int i)
{
    if(n==1) sum++;
    while(i<=n)
    {
        if(n%i==0) f(n/i,i);
        i++;
    }
    return ;
}
int main()
{

    int t=0;
    cin>>t;
    while(t--)
    {
        int n=0;
        cin>>n;
        int i=2,result=1;

       for (i=2;i<=n/2;i++) {
            if(n%i==0)
            {
                sum=0;
                f(n/i,i);
                result=result+sum;
            }

        }
        cout<<result<<endl;
    }
    return 0;
}
int sum;

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

}

int main(){
    int n;
    cin>>n;
    while(n>0){
          
          int x = 0,i,ans = 1;
          cin>>x;
          for(i = 2;i*i < x;i++){
                if( x%i == 0) {
                    sum = 0;
                    f(x/i,i);
                    ans+=sum;
                    }
                }
          cout<<ans<<endl;
          n--;  
}

    return 0;
    }
//????

int f(int x,int min){
	if(x<min) return 0;
	int r=1;
	for(int i=min;i<x/2;i++){
		if(x%i==0){
			r+=f(x/i,i);
		}
	}
	return r;
}

int main(){
	int n;
	cin>>n;
	while(n--){
		int x;
		cin>>x;
		cout<<f(x,2)<<endl;
	}
}
int DFS(int ,int );
int main()
{
	int q;
	cin>>q;
	for(int i=0;i<q;i++)
	{
	int n;
	int h=0;
	cin>>n;
	cout<<DFS(n,n)<<endl;
	}

	return 0;
}
int DFS(int n,int p)
{
	int ans=0;
	if(n==1)return 1;
	for(int i=2;i<=p;i++)
	{
		if(n%i==0)
		{
			ans=ans+DFS(n/i,i);
		}
	}
	return ans;

}
int num;
main()
{
      void fenjie(int x,int qi);
      int n,k,a;
      scanf("%d",&n);
      for(k=1;k<=n;k++)
      {
          num=0;
          scanf("%d",&a);
          fenjie(a,2);
          printf("%d\n",num);
      }
}
void fenjie(int x,int qi)
{
      if(x==1) num++;
      else
      {
         for(int i=qi;i<=x;i++)
         {
              if(x%i==0) fenjie(x/i,i);
         }
      }
}
int fenjieyinshi(int n,int m)//????????
{
	int i=0;
	int sum=1;
	if(n<m)
		return 0;//??????????????????0
	else
	{
		for(i=m;i<n;i++)
			if(n%i==0)//????????????????
				sum+=fenjieyinshi(n/i,i);//??
		return sum;
	}
}
int main()//???
{//?????
	int n=0;
	int i=0;
	int a=0;
	cin>>n;//???????????????
	for(i=0;i<n;i++)
	{
		cin>>a;//???????
		if(a==1)
			cout<<1<<endl;
		else
			cout<<fenjieyinshi(a,2)<<endl;//????
	}
	return 0;
}//?????
int cal(int M, int N)
{
    int i;
	int num=0;
	if(M==1) return 0;
	if(N>=M) return ( 1+cal(M,M-1));
	for(i=2;i<M;i++)
	{
		if(M%i==0&&i<=N) num=num+cal(M/i,i);
	}
	return num;
}
int main()
{
	int n,M;
	cin>>n;
	while(n--)
	{
		cin>>M;
		cout<<cal(M,M)<<endl;
	}
	return 0;
}