semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//????????????????????????????

//?a??????????min???
//?????????????
int F(int min,int a)
{
	int i;
	int sum=0;
	if(min==a)      //????????
		return 1;
	if(a==1)
		return 1;     //???????
	for(i=min;i<=a;i++)
	{
		if(a%i==0)
			sum+=F(i,a/i);   //??????????
	}
	return sum;    //???
}

int main()
{
	int a,n;
	int i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	    scanf("%d",&a);
	    printf("%d\n",F(2,a));
	}
	return 0;
}
void TRY(int,int);
int num=1;
int main()
{
	unsigned short int n;
	int INTEGER;
	cin>>n;
	while(n-->0)
	{
		cin>>INTEGER;
		int h=2;
		TRY(h,INTEGER);
		cout<<num<<endl;
		num=1;
	}
}
void TRY(int a,int b)
{
	int i;
	for(i=a;i<=sqrt(b);i++)
	{
		if((b%i==0)&&(b/i!=1))
		{
			num++;
			TRY(i,b/i);
		}
	}
}
/**
*???4.cpp
*??????
*???????
*???12?1?
*/
int num,s=1; //??num??????s???????
void divide(int n,int a) //?????n????a??????
{
for(int i=n;i<=a/s;i++)//??
{
s*=i; 
if(s==a) //???????a???????+1
num++;
else if(s<a && a%s==0) //??????a,??????????
divide(i,a);
s/=i; //????
}
}
int main() //???
{
int n,i,a;
cin>>n; //????????
for(i=0;i<n;i++)
{
num=0; //????????0
cin>>a; //??????
divide(2,a); //??????
cout<<num<<endl; 
}
return 0;
}
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;
}
int de(int s,int a){      //???????a???????s?????????
	int sum=0;           //?????????????
	if(a==1)return 1;    //a?????????????????
	else if(s>a)return 0;   //a?????????????????????
	for(int i=s;i<=a;i++)  //for????a??????????
		if(a%i==0)sum=sum+de(i,a/i);  //?????????????????????
	return sum;       //??????
 }
 int main(){      //???
     int n;                //??????n????????
     cin>>n;        //??n??
     while(n>0){      //while??????????
    	 int a;         //??????a
    	 cin>>a;              //??a??
    	 cout<<de(2,a)<<endl;   //???a???????2??????????
    	 n--;                //n???
     }
     return 0;     //?????????????????
}
int f(int a,int b)
{
    int c,s=0,i;
    c=(int)sqrt(a);
    for(i=b;i<=c;i++)
    {
     if(a%i==0)
     s=s+f(a/i,i);
    }
    return s+1;
}
main()
{
      int n,i;
      scanf("%d",&n);
      int num[1000];
      for(i=0;i<n;i++)
      {
        scanf("%d",&num[i]);
        printf("%d\n",f(num[i],2));
      }
      }
int begin=2;
int main()
{
	int f(int);
	int n=0,x=0,i=0;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>x;
		cout<<f(x)+1<<endl;
	}
	return 0;
}
int f(int x)
{
	int i=0;
	int left=0;
	int num=0;
	for(i=begin;i<=sqrt(x);i++)
	{
		if(x%i==0)
		{
			num++;
			left=x/i;
			begin=i;
			num+=f(left);
		}
	}
	//if(num!=0)
	    begin=2;
	    return num;
	//else
		//return 0;
}
int w=1;
int f(int x)
{
	int z=1,y,v=0;
	for(y=w+1;y<=sqrt(x);y++)
	{
		if(x%y==0)
		{
			
			z=z+f(x/y);
			v++;
			w=y;
		}
	}
	if(v==0)
	z=1;
	return z;
}
main()
{
	int n,u=0,a;
	scanf("%d",&n);
	do
	{
		scanf("%d",&a);
		printf("%d\n",f(a));
		u++;
		w=1;
	}
	while(u!=n);
}
//============================================================================
// Name        : hanshu0109.cpp
// Author      : 1300012911
// Version     : 20131120,Wed,11th week
// Copyright   :
// Description : ????
//============================================================================


int fenjie(int a,int max){//a:?????max??1??????????????
	int i = 0;
	int sum = 0;//????
	if (a == 1) return 1;//1???????1??????
	for (i = max;i >= 2;i--)
	{
		if ((a % i) == 0) sum += fenjie(a/i,i);//i??????
	}
	return sum;//????
}

int main() {
	int k = 0;
	int n = 0;
	int num = 0;
	cin >> n;//??
	for (k = 1;k <= n;k++)
	{
		cin >> num;//?????
		cout << fenjie(num,num);//????????
		if (k < n) cout << endl;
	}
	return 0;
}
int a[1000];
int l=0,x;
int fff(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(q-1,1,x);
        printf("%d\n",l,x);
       }
}
int fff(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(w,i,x);
             x=x*a[i];
             }
            }
}
int fenjie(int x,int y){//x????? y??????????
	int i,s=0;//s??????
	if(x==y)return 1;
	for(i=y;i<x;i++)
		if(x%i==0)s+=fenjie(x/i,i);
	if(i==x)s++;
	return s;
}
int main(){
	int n,i;//n???????
	cin>>n;
	for(;n>0;n--){
		cin>>i;
		cout<<fenjie(i,2)<<endl;
	}
	return 0;
}
int factoring(int a,int b)
{
    int i,kind=0;
	if(a==1)
	{
	    kind=1;
	}

	else
	{
	    for(i=b;i<=a;i++)
		{
		    if(a%i==0)
			{
	            kind=factoring(a/i,i)+kind;
			}
		}
	}
	return kind;
}

int main()
{
	int n,i,j,a[30000]={0},b[30000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		b[i]=factoring(a[i],2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",b[i]);
	}
	return 0;
}
//**********************************************
//**???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;
}
//**********************************************
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;

}
/*
 * 009.cpp
 *
 *  Created on: 2012-11-27
 *      Author: asus
 */
int varieties = 0;//??????


void divide(int forward, int number)//??divide??
{
 int i;
 if (number == 1)//????
    {
  varieties++;//??
 }
 for (i = forward; i <= number; i++)//forward???????,number?????,?forward?????
    {
  if (number % i == 0)//????
        {
	divide(i, number / i);
 }}}

int main()//???
{
	int n = 0, num = 0;
	cin >> n;//????
	for (int i = 1; i <= n; i ++)
		{cin >> num;
	divide(2, num);//??
	cout << varieties << endl;
		varieties = 0;
		}
	return 0;
}
int num=0;
void asd (int i,int q)
{
	int j;
	for(j=q;j>1;j--)
	{
		if(i%j!=0)
			continue;
		if(i==j)
		{
			num++;
		}
		else
		{
			q=j;
			asd(i/j,q);
		}
	}
}
int main()
{
	int n,o;
	cin>>n;
	for(o=0;o<n;o++)
	{
		num=0;
		int a;
		cin>>a;
		asd(a,a);
		if(num==1)
			cout<<1<<endl;
		else
			cout<<num<<endl;
	}

}
int s=0;
void devide(int,int);
int main()
{
    int n,m;
    cin>>n;
    while(n--)
    {
       cin>>m;
       s=0;
       devide(2,m);
       cout<<s+1<<endl;
       
    }
    return 0;
}

void devide(int a,int b)
{
    int i;
    for(i=a;i<=sqrt(b);i++)
    {
       if(b%i==0)
       {
         s++;
         devide(i,b/i);
         
       }
       
       
    }
    
}
int f(int x,int y) //???????????????y?????????x????????
{
	int i,sum = 0;
	for(i = x; i <= sqrt(y); i++){
		if(y % i == 0)  sum += f(i,y / i) + 1;} //??????
	    return sum;	
}

int main(){
int n,x,i,b[100];
cin>>n; //?????????
for(i=1;i<=n;i++){cin>>x;b[i]=x;}
for(i=1;i<=n;i++){cout<<f(2,b[i])+1<<endl;} //???????

return 0;

}
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;//????
}
int shi(int a)
{
      int b=sqrt(a);
      for(int i=2;i<=b;i++)
      {
           if(a%i==0)return 0;
       }
      return 1;
}
int shu(int m,int k)
{
      int a=1;
      for(int j=k;j<=sqrt(m);j++)
     {
            if(m%j==0&&m/j>=k)
            {
                 a++;
                 if(shi(m/j)==0)a+=shu(m/j,j)-1;
            }
     }
     return a;
}
int main()
{
  int n;
  scanf("%d",&n);
  for(int i=1;i<=n;i++)
 {
     int m,a;
     scanf("%d",&m);
     printf("%d\n",shu(m,2));
 }
return 0;
}
/*???2011?11?28?
 *??????
 *????division.cpp
 *????? - 1090 ????
 */


int main()
{
	int n = 0, integer = 0;							//???????????n?????plate????apple
	int division(int, int);								//????putapple??????????plate?????
													//apple???????????
	cin >> n;										//??????n
	for (int i = 0; i < n; i++)
	{
		cin >> integer;
		cout << division(integer, integer) << endl;			//??????????putapple????????
	}
	return 0;
}


int division(int integer, int limit)
{
	if (limit <= 1)
		return 0;
	switch(integer)
	{
	case 1:
		return 1;
		break;
	default:
	{
		int sum = 0;
		for (int a = 1; a <= integer; a++)
		{
			if (integer%a != 0)
				continue;
			else if (integer/a > limit)
				continue;
			else
				sum += division(a, integer/a);
		}
		return sum;
	}
	break;
	}
}
/*
 *???: ????.cpp
 *??????
 *????: 2012-11-12
 *??: ????????????
 */


int count(int num, int m)
//???????????????????a1????????????
{
    if (num % m != 0) return 0;
    
    if (num == m) return 1;
    else {
        int counter = 0;
        for (int i = m; i <= num / m; i++){
                counter += count(num / m, i);
        }
        return counter;
    }
}

int main ()
{
    int n,num;
    cin >>n;
    for (int i = 1; i <= n; i++){
        int counter = 0;
        cin >> num;
        for (int i = 2; i <= num; i++)
            counter += count(num,i);//a1???2???m???
        cout << counter << endl;
    }
    return 0;
}
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);
		}
	}
}
int num=0;
void f(int x,int y)
{
    num++;
    for(int j=y;j*j<=x;j++)
    {
           if(x%j==0)
             f(x/j,j);
    }
}
int main()
{
    int n;
    cin>>n;
    int a[1100];
    for(int i=1;i<=n;i++)
    {
            num=0;
            cin>>a[i];
            f(a[i],2);
            cout<<num<<endl;
            
    }
        return 0;
}
int n;
int next(int a,int b)
{
	if(a==1)
		return 1;
	if(a<b)
		return 0;
	int sum=0;
	for(;b<=a;b=b+1)
		if(a%b==0)
			sum=sum+next(a/b,b);
	
	return sum;
}
int main()
{
	int i,m;
	cin>>m;
	for(i=0;i<m;i=i+1)
	{
		cin>>n;
		cout<<next(n,2)<<endl;
	}
	return 0;
}
//??????sum??????????temp??????
int sum ,temp ;
void fact(int) ;//??fact????int?????

int main ()
{
	int n , i , k ;
	cin >> n ;
	for ( i = 0 ; i < n ; i++ )
	{
		cin >> k ;
		sum = 0 ;
		temp = 2 ;//????????????????????????
		fact(k) ;
		cout << sum << endl ;
	}
	return 0 ;
}

void fact(int k)
{
	if ( k == 1 )//???????
	{
		sum++ ;
		return ;
	}
	int i ;//i?????k???????temp??????????????????????????
	for ( i = temp ; i <= k ; i++ )
	{
		if ( k % i == 0 )
		{
			temp = i ;//??temp?
			fact(k/i) ;//???????
		}
	}
}
void Factorize(int n, int fact);
int number = 0;
int main()
{
	int times, num, i;
	cin >> times;
	for (i = 0; i < times; i++)
	{
		cin >> num;
		Factorize(num, 2);
		cout << number << endl;
		number = 0;
	}
	return  0;
}
void Factorize(int n, int fact)
{
	int i;
	for (i = fact; i <= sqrt(n); i++)
	{
		if (n % i == 0)
			Factorize(n / i, i);
	}
	number++;
}
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); 
	}}
/*
 * 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;
}
int a,n,sum=0;
void t(int m)
{
	int i,j;
	for(i=m;i<=a;i++)
	{
		if(a%i==0)
		{
			a=a/i;
			if(a==1)
			{
				sum+=1;
			}
			else t(i);
				a=a*i;
		}
	}
}

int main()
{
	int k;
	cin >> n;
	for(k=0;k<n;k++)
	{
		sum=0;
		cin >> a;
		t(2);
		cout << sum << endl;
	}
	return 0;
}
/*
 * e.cpp
 * ?????
 * ????: 2010-12-8
 * ???????
 */

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

int main(void)
{
	int n;
	cin>>n;
	int a;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		cout<<find_factor(a,2)<<endl;
	}
	return 0;
}
//???????a?????????????????a = a1 * a2 * a3 * ... * an???1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
//Goofy 2010 12 05
void FenJie(int);
int counter=0;
int Befor=0;
int main()
{
	int n, x, i;
	cin>>n;
	for(i=0; i<n; i++)
	{
		cin>>x;
		counter=0;
		Befor=x;
		FenJie(x);
		cout<<counter<<endl;
	}
	return 0;
}
void FenJie(int x)
{
	int i, temp=Befor;//?????????
	if (x==1)
	{
		counter++;
		return;
	}
	for(i=Befor; i>1; i--)//??????
	{
		if (x%i==0)
		{
			Befor=i;
			FenJie(x/i);
		}
		Befor=temp;
	}
	return;
}
int ispr(int t) 
	{
    int v=sqrt(t*1.0)+1;
    for(int i=2; i<v; i++)
        if(t%i==0)
            return 0;
    return 1;
    }


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


int main() {
    int n;
    scanf("%d",&n);
    while(n--) {
        int a;
        scanf("%d",&a);
        if(ispr(a)) {
            printf("1\n");
            continue;
        }
        
        int i=2,res=1;
        while(i<=a/2) {
            if(a%i==0) {
                sum=0;
                fun(a/i,i);
                res+=sum;
            }
            i++;
        }
        printf("%d\n",res);
    }
}
void main()
{
	int zy(int a,int b);
	int j,n,m,sum;
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
		scanf("%d",&m);
		sum=zy(2,m);
		printf("%d\n",sum);
	}
}
	int zy(int a,int b)
	{
		int i,c,t=1;
		c=0;
	for(i=a;i*i<=b;i++)
		{
			if(b%i==0)
				c=zy(i,(b/i))+c;
		}
		if(i*i>b)
			c=c+1;
		return(c);
	}
int factor(int N,int min);
int main()
{
	int m,n,i,k;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		k=factor(m,2);
		printf("%d\n",k);	
	}
		
	return 0;
}
int factor(int N,int min)
{
	int result=1,i;
	if(N<min)
	return 0;
	for(i=min;i<N;i++)
	{
		if(N%i==0)
		result+=factor(N/i,i);	
	}	
	return result;
}
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;
}
int factor(int,int);
int main()
{
	int n,num;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>num;
		cout<<factor(num,2)<<endl;
	}
	return 0;
}
int factor(int n,int min)
{
	int i;
	int num=1;
	if(n<min)
		return 0;
	else
	{
		for(i=min;i<n;i++)
		{
			if(n%i==0)
				num+=factor(n/i,i);
		}
	}
	return num;
}
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;
}
//*********************************
//* file?1.cpp
//* description: ????
//* author: ?? 1200012858		
//* date: 2012-12-1
//*********************************
int decompose(int x, int y);
int main ()
{
	int n, m;
	cin >> n;
	for (int j = 1; j <= n; j++)
	{
		cin >> m;		
		cout << decompose(m, 2) << endl;
	}
	return 0;
}
int decompose(int x, int y)
{
	int sum = 1,b;
	b = (int)sqrt(x);
	if (x == 1) return 0;
	for (int i = y; i <= b; i++)
	{
		if (x % i == 0)
		{	
			 sum = sum + decompose(x / i, i);
		}
	}
	return sum;
}
int sum;
void zhongshu(int qian,int a);
int main()
{
    int n,i,j,a[100];
    cin>>n;
    for(i=0;i<n;i++)
    cin>>a[i];
    for(i=0;i<n;i++)
    {  sum=0;
       zhongshu(2,a[i]);
       cout<<sum<<endl;
       }
    return 0;
}
void zhongshu(int qian,int a)
{
   int i,j,c;
   if(a==1)
   {
   sum=sum+1;
   return;
  }
   for(i=qian;i<=a;i++)
   {
      if(a%i==0)
         zhongshu(i,a/i);
   }
}
int sum=0,g,f;
int divide (int chushu,int a)
{
    int i;
    for (i=chushu;i<=a;i++)
    {
        if (a%i==0)
        {
            f=a/i;
            if (f>1)
            {g=i;divide (g,f);}
            else
            {
                sum++;
            }
         }

}   return sum;
}
int main()
{
    int n=0;
    cin>>n;
    int p=0;
    for (p=0;p<n;p++)
    {
       int b=0,c=2;
       cin>>b;
    sum=0;
    cout<<divide (c,b)<<endl;
    }

    return 0;
}
int number=0;
int l;
void sort (int n)
{
	int i;
	for (i=l;n/i>=i;i++)
	{
		if (n%i==0)
		{
			l=i;
			sort (n/i);
			if (n/i==1)
			   	number++;
		}
	}
	number++;
}
int main ()
{
	int n,m,k;
	cin >> n;
	for (k=0;k<n;k++)
	{
		l=2;
		number=0;
    	cin >> m;
    	sort (m);
    	cout << number << endl;
	}
	return 0;
}
//******************************************************************************
//??? ??????????????                                          *
//????wayne                                                                *
//?????11.23                                                              *
//******************************************************************************
int sum=1,j=2;                     //?????????????????
void num(int);                     //??????
int main()                         //?????
{
	int n,a[100];
	int i;
	cin>>n;
	for (i=1;i<=n;i++)             //????n?????
	{
		cin>>a[i];
		num(a[i]);                 //????
		cout<<sum<<endl;
		sum=1,j=2;                 //????????????????
	}
	return 0;
}
void num(int a)                    //????
{
	int k;
	for (k=j;k<=sqrt(a);k++)       //k=j?????????????????
	{ 
		if (a%k==0)                //???????             
		{
			sum=sum+1;             //?????
			j=k;                   //???????
			num(a/k);              //????
		}
	}
}
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;
}
int s(int n,int m){
if (n==1)return 1;
int an=0;
for (int i=m;i>1;i--){
if (n%i==0)an+=s(n/i,min(i,n/i));
}
return an;
}
int main(){
int N;
cin>>N;
int x;
for (N;N>0;N--){
cin>>x;
cout<<s(x,x)<<endl;
}
return 0;
}
/*
 *  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;
}
int num;
int fjys(int n,int m,int i,int d,int ji[20])
{
	int a;
	for(a=i;a<m;a++)
	{
		if(n%a==0)
		{
			ji[d]=a;
			int chenji=1,k;
			for(k=0;k<=d;k++)
				chenji=chenji*ji[k];
			if(chenji==m)
			{
				num++;
				break;
			}
			else 
				fjys(n/a,m,a,d+1,ji);
		}
	}
	return num;
}
int main()
{
	int m,n,j,result=0,ji[20]={0};
	cin>>m;
	for(j=1;j<=m;j++)
	{
		num=0;
		cin>>n;
		result=fjys(n,n,2,0,ji);
		cout<<result+1<<endl;
	}
		return 0;
}
int panduansushu(int t)
{
	int i;
	for(i=2;i<t;i++)
	{
		if(t%i==0){break;}
	}
	if(i>t/2)return 1;
	else return 0;	
}

int sum=0;
void fun(int n,int i)
{
	if(n==1)sum++;
	for(;i<=n;i++)
	{
		if(n%i==0)fun(n/i,i);
	}
}

void main()
{
	int a[100],i,res,j,n;
	scanf("%d",&n);
	for(j=0;j<n;j++)scanf("%d",&a[j]);
	for(j=0;j<n;j++)
	{
		if(panduansushu(a[j])==1)
		{
			printf("1\n");
		}
		else{ for(i=2,res=1;i<a[j]/2;i++)
		{
			if(a[j]%i==0){sum=0;fun(a[j]/i,i);res+=sum;}

		}
		printf("%d\n",res);}}
}
int p=0;

int factor(int a,int min)
{
	int sum=0;
	if(min>=a)return 1;
	for(int j=min;j<=a/min;j++)
	if (a%j==0)
		sum+=factor(a/j,j);
	return sum;
}

int main()
{
	int n=0,a=0;
	cin>>n;
	while(n>0)
	{
		cin>>a;
		if(a<=2) cout<<1<<endl;
		else cout<<factor(a,2)+1<<endl;
		n--;
	}
	return 0;
}
int sum=0;                             //???????
void fj(int n,int m)
{
	int i;                             //?????
	for(i=m;i<=sqrt(n);i++)            //???????
	{
         if(n%i==0)
		 {
			 sum++;
			 fj(n/i,i);                //???????
		 }
	}
}
int main()
{
	int j,N;                           //??????????????
	int a[100];                        //?????
	cin>>N;
	for(j=1;j<=N;j++)
	{
		cin>>a[j];                     //?????
	}
	for(j=1;j<=N;j++)
	{
		sum=0;
		fj(a[j],2);                    //?????
		cout<<sum+1<<endl;
	}
	return 0;
}
int f(int x,int k);
int main()
{
    int i=1,n,m;
    int result;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
    scanf("%d",&m);
    result=f(m,2);
    printf("%d\n",result);
    }
     return 0;
}
int f(int x,int k)
{
	int a=0;
    int i;
	if (x==1) 
    return 1;
	for (i=k;i<=x;i++)
	{
	if (x%i==0) 
    a=a+f(x/i,i);
    }
	return a;
}
int count;
void solve(int num,int a,int m)
{
	int i;
	if(num==1)
	{
	count++;
	return;}
	for(i=2;i<=num;i++)
	{
		if(i>=a&&(num%i)==0)
		solve(num/i,i,m+1);
	}
}
main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	 
	int num,a;
	count=0;
	scanf("%d",&num);
	solve(num,0,1);
	printf("%d\n",count);}
}