semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//
//  main.cpp
//  HomeWork_11.14.Functions
//  ????
//  Created by ??? on 11/19/12.
//  Copyright (c) 2012 airjcy. All rights reserved.
//

//#include <string>



//??n???????????from
int num;
void divide(int n,int from)
{

    int i;
    for (i = from; i < n; i ++) {
        if (n % i == 0) {
            if (n / i < i) {
                return;
            }
            num ++;
            divide(n / i, i);
        }
       
    }
}


// 20    2 10   2 2 5     4 5    5 4
int main(int argc, const char * argv[])
{
    
    int n;
    cin >> n;
    int i;
    int numberToDivide;
    for (i = 0; i < n; i++)
    {
        cin >> numberToDivide;
        num = 0;
        divide(numberToDivide, 2);
        cout << num + 1 << endl;
    }
     
//    num =0;
//    divide(20, 2);
//    cout << num + 1;
}
int ispr(int t) 
{
    int v=(int)sqrt(t*1.0)+1;
    for(int i=2; i<v; i++)
        if(t%i==0)
            return 0;
    return 1;
}


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


int main() {
    int n;
    scanf("%d",&n);
    for (int j=0; j<n; j++)
    {
        int a;
        scanf("%d",&a);
        if(ispr(a)==1) 
        {
            printf("1\n");
            continue;
        }
        
        int res=1;
        for (int i=2; i<=a/2; i++)
        {
            if(a%i==0)
            {
                sum=0;
                fun(a/i,i);
                res=res+sum;
            }
            
        }
        printf("%d\n",res);
    }
    
    return 0;
}
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; 
}
int fenjie(int x ,int b)
{
	int i,z=0,c;
	for(i=b;i<=x;i++)
	{
		if(x==i)
			z=z+1;
		else if(x%i==0)
		{
			c=x/i;
			z=z+fenjie(c,i);
		}
	
	}
	return(z);
}
void main()
{
	int n,i,num,a;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		num=fenjie(a,2);
		printf("%d\n",num);
	}

}
int f(int,int);
int main()
{
	int n,a[32768],i;
	cin>>n;
	for(i=0;i<=n-1;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<=n-1;i++)
	{
		cout<<f(a[i],2)+1<<endl;
	}
	return 0;
}
int f(int a,int p)
{
	int i,sum=0;
	for(i=2;i<=sqrt(a);i++)
	{
		if(((double)a/i==a/i)&&(i>=p))
		{   p=i;
			sum=sum+1+f(a/i,p);
		}
	}
	return sum;
}
int fenjie(int num,int min);
int k=2;
int main(){
     int n,i,jieguo,num;
     scanf("%d",&n);
     for(i=1;i<=n;i++){
          scanf("%d",&num);
         jieguo=fenjie(num,2);
         printf("%d\n",jieguo);
        }
     return 0;
    }

int fenjie(int num,int min){
       int j,jieguo=1;
      
      if(num<min){
         return 0;
         }

      for(j=min;j<num;j++){
         
         if(num%j==0){
            
            jieguo+=fenjie(num/j,j);
           }
        }
      return jieguo;
   }
int main()
{
	int f(int x,int y);
	int n,i;
	int a[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		printf("%d\n",f(a[i],2));
	}
	scanf("%d",&i);
	return 0;
}
int f(int x,int y)
{
	int s,j,k,l,m,n;
	if(x==1) s=1;
	else if(y>x) s=0;
	else {
		for(l=1;l<=x;l++)
		{
			k=0;
			if(x%l==0) k=k+1;
		}
		if(k==2) s=1;
	else 
	{
		s=0;
		for(j=y;j<=x;j++)
		{
		
			if(x%j==0){ s=s+f(x/j,j);}
		}
		
	}
	}
		return s;
}
int divide(int n,int min)//?n?????????????min
{
	int i,method=0;//method??n????
	if(n>=min)
		method++;
	for(i=min;i<n;i++)
	{
		if(!(n%i))
			method+=divide(n/i,i);
	}
	return method;
}
int main()
{
	int number=0,integer;//??????,integer??????
	int i;
	cin>>number;
	for(i=0;i<number;i++)
	{
		cin>>integer;
		cout<<divide(integer,2)<<endl;
	}
	return 0;
}
//*****************************
//* ???????            *
//* ??????              *
//* ???2010-12-7           *
//*****************************
int num=1,flag=2;//????1?????,?????
void way(int);
int main()
{
	int a,n;
	cin>>n;
	while(n--)
	{
		cin>>a;
		way(a);
		cout<<num<<endl;
		num=1;
		flag=2;//???
	}
	return 0;

}
void way(int a)
{
	int i,max;
	max=sqrt(a);
	for(i=flag;i<=max;i++)//?????????????????????
	{
		if(a%i==0)//????????
		{
			flag=i;//??
			num++;
			way(a/i);//???????????????????
		}
	}
}
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;
}
int fen(int m,int k)
{
    int i,t=1,n=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+fen(m/i,k);
        }
    } 
    return t;              
}
int main()
{
    int fen(int m,int k);
    int n,i,x;
    scanf("%d\n",&n);
    for(i=0;i<n;i++)
    {
         scanf("%d",&x);
         printf("%d\n",fen(x,1));
     }
    
 }
int f(int c,int t);
void main()
{
	int n,c;
	scanf("%d",&n);
	for(;n>0;n--)
	{
		scanf("%d",&c);
		if(c==1 || c==2)
			printf("1\n");
		else
			printf("%d\n",f(c,2));
	}
	}
int f(int c,int t)
{
	int count=1,i;
	for(i=t;i<c;i++)
	{
		if(c%i==0)
			count+=f(c/i,i);
	}
	if(i==c)	return count;
	else		return 0;
}
void f(int i,int m);
int sum;
int main()
{
      int n,i,m,k;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {               sum=1;
                      scanf("%d",&m);
                      f(2,m);
                      printf("%d\n",sum);
                      
      }
}
      void f(int i ,int m)
      {
           int k,s;
           s=(int)sqrt(m);
           for(k=i;k<=s;k++)
           {
                            if(m%k==0)
                            {
                                      sum++;
                                      f(k,m/k);
                            }
                            
           }
           
        }
//*************************************
//* ????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;
}
/************************************
*???????						*
*?????? 1200012921			*
*???2012-11-30					*
*************************************/


int part(int x, int t)					//x????????
{
	int i;
	int number = 1;						//?x???????????number?
	if (x == 1)							//x=1?????
	{
		return 0;
	}
	if (x == 2)							//x=2?????????
	{
		return 1;
	}
	for (i = t; i <= sqrt(x); i++)		//???????
	{
		if (x % i == 0)					//??????
		{
			number += part(x / i, i);	//??
		}
	}
	return number;						//???????number
}

int main()
{
	int i, n, a;
	cin >> n;						//n???
	for (i = 1; i <= n; i++)		//?????????a?????????
	{
		cin >> a;
		cout << part(a, 2) << endl;
	}
	return 0;
}
int fenjie(int,int);

int main()
{
	int times,k,num;
	cin>>times;
	for(k=1;k<=times;k++)
	{
		cin>>num;
		cout<< fenjie(num,1)<<endl;
	}

	return 0;
}

int fenjie(int x,int y)
{
	int i,a=1;
	if(x<y) return 0;
	if(x==y) return 1;
	if(x>y)
	{
		if(y==1)
		{
			for(i=y+1;i<=x;i++)
			{
				if(x%i==0) a=a+fenjie(x/i,i);
			}
		}
		else
		{
			for(i=y;i<=x;i++)
			{
				if(x%i==0) a=a+fenjie(x/i,i);
			}
		}
		return a;
	}

}
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;
}
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;
}
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;
}
/*
 * ways.cpp
 *
 *  Created on: 2013-11-24
 *      Author: Mac
 */


int factor(int a, int f)
{
	if(a == f)
		return 1;
	if (a < f)
		return 0;
	if(a%f == 0)
		return factor(a, f+1) + factor(a/f, f);
	else return factor(a, f+1);
}

int main()
{
	int x, a;
	cin >> x;
	while(x > 0)
	{
		cin >> a;
		cout << factor(a, 2) << endl;
		x --;
	}
}
int main()
{
int n,i,a,factor(int N,int min);
scanf("%d",&n);
for(i=0;i<n;i++)
{
	scanf("%d",&a);
    printf("%d\n",factor(a,2));
}

return 0;
}
int factor(int N,int min)
{
	int i,result;
	result=1;
	
    if(N<min)
	{
		return 0;
	}
	for(i=min;i<N;i++)
	{
		if(N%i==0)
		{
	      result+=factor(N/i,i);
		}

	}return result;
}
void main()
{	
	int f(int m,int i);
    int n,a,b,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {scanf("%d",&a);
    	b=f(a,2);
    printf("%d\n",b);}
}
int f(int m,int i)
{	int s,j;
	if(m<i)  s=0;
	else
		{if(m<i*i) s=1;
		else 
			{for(s=1,j=i;j<=m;j++)
				{if(m%j==0)
					s=s+f(m/j,j);
				}
			}
		}
	return(s);
}
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];
             }
            }
}
int col(int a,int b);
int main()
{int n,i,m,l;
scanf("%d",&n);
for(i=1;i<=n;i++)
   {scanf("%d",&m);
   l=col(m,2)+1;
   printf("%d\n",l);
   }
   return 0;
}
int col(int a,int b)
{int i,t,tt=0,sig=0;
for(i=b;(i<a/2)&&((a/i)>=i);i++)
  {
	if(a%i==0)
    {t=a/i;
     tt=tt+1+col(t,i);
     sig=1;
    }
  }
if(sig==0)
  tt=0;
 return(tt);
}
/*
????
??
	?????????????
	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;
}
//**********?????????*********************
//**********???????*************************
//**********?????2012?11?27?***************
//**********???1200062701**********************


int ifsushu(int n)                                   //????????????1???
{
	if(n == 1)
	{
		return 1;
	}
	else
	{
		for(int f = n - 1;f >= 2; f--)               //??n?????
		{
			if(n % f == 0) break;
			if (f == 2)
			{ 
				return 1;
			}
		}
	}
	return 0;
}
int sum = 0;
int zhaoyinshu(int x, int max)
{
	if(x == 1)
	{
		sum++;
		return 0;
	}
	for(int i = max; i >= 2; i--)
	{
		if(x % i == 0)                // ??i?????
		{
			zhaoyinshu(x / i, i);
		}
	}
}
int main()
{
	int time, number, t;
	cin >> time;
	for(int j = 0; j < time; j++)
	{
		cin >> number;
		if(ifsushu(number) == 1)
		{
			cout << "1" << endl;
		}
		else
		{
			zhaoyinshu(number , number / 2);
			cout << sum + 1 << endl;       //????????????~
			sum = 0;
		}
	}
	return 0;
}
/*
 *  1000012850_34.1.cpp
 *  ????????????a??????????????? ?????????
 *  Created on: 2010-11-27
 *      Author: william
 */
int resolution_into_factors(int j,int i)
{
	int m, sum=0, k=0;
	for(m=j ;m<=sqrt(i); m++)
	{
		if(i%m==0)
		{
            sum=resolution_into_factors(m, i/m)+sum+1;
			k++;
		}
	}
	if(k==0) return 0;
    return sum;
}
int main()
{
    int n, k, i;
    cin>>n;
    for(k=1; k<=n; k++)
    {
    	cin>>i;
    	cout<<resolution_into_factors(2,i)+1<<endl;
    }
    return 0;
}
int fg(int k,int m)
{
    int j,d=0;
	if (m==1)
	{
       d=1;
	}
   	for(j=k;j<=m;j++)
	{
		if (m%j==0)
			d=d+fg(j,m/j);
	}
	return(d);
}

int main()
{
	int n,i,a[40000],b[40000],s;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=1;i<=n;i++)
	{
		b[i]=fg(2,a[i]);
		printf("%d\n",b[i]);
	}
	return 0;
}
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;
}
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);
	}

}
int f(int m,int l)
{
	int re=0,j;
	if(l==4)
      re=1;
	if(l>4)
	{
		for(j=m;j<=sqrt(l);j++)
		{
			if(l%j==0)
			{
				re=re+1+f(j,l/j);
			}
		}
	}
	return re;
}
int main()
{
	int n,i,a[100]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",(f(2,a[i])+1));
	}

}
int reek(int i,int j)
{
	int k,g=0;
	for (k=j;k<i;k++)
	{
		if ((i%k==0)&&(k!=1))
		{
			g=1;
			break;
		}
		else continue;
	}
	if (g==0) return 1;
	else
	{
		int num=1;
		for(k=j;k<=sqrt(i);k++)
		{
			if ((i%k==0)&&(k!=1))
				num+=reek(i/k,k);
			else continue;
		}
		return num;
	}
}
int main()
{
	int n,i,a[1000];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[n];
		cout<<reek(a[n],1)<<endl;
	}
	return 0;
}
int cc;//cc&#190;íê&#199;ò&#187;12?&#196;·&#214;&#189;a?&#196;·&#189;·¨&#214;&#214;êy
void fen(int x,int h); 
int main()
{
	int n=0,k=0;
	  cin>>n;
	  for(k=1;k<=n;k++)
	  {
			cc=0;
			int ff;
			cin>>ff; 
			fen(ff,2);
			cout<<cc<<endl;
	  }
	return 0;
} 
void fen(int x,int h)
{
	for(int i=2;i<=x;i++)
	  {
	        if((x%i==0)&&(i>=h)&&(i<x))
			    fen(x/i,i);
		    if((x%i==0)&&(i>=h)&&(i==x))
			    cc++;		
	  }
}
int main()
{
    int a[10000],b[10000],p,q,m,n,i,j;
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     scanf("\n%d",&a[i]);
                     }
    for(i=0;i<n;i++){
                     printf("%d\n",ans(a[i],2));
                     }
    return 0;
}

int ans(int sum,int min)
{
    int w,x,u=1;
    for(w=min;w<sum/2;w++){
                         x=sum%w;
                         if(x==0){
                                  if(w<=sum/w)
                                  u+=ans(sum/w,w);
                                  }
                         }
    return u;
}
int numcheck(int num,int a)//???????num??????????a??????
{
	int i=0,sum=0; 
	if(num==1)//??1????????
		return 1;
	else if(num<a)
		return 0;
	else
	{
		for(i=a;i<=num;i++)//?????????????????
		{
			if(num%i==0)
				sum=sum+numcheck(num/i,i);
		}
	}
	return sum;
}
int main()
{
	int n=0,i=0,num=0,sum=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>num;
		sum=numcheck(num,2);
		cout<<sum<<endl;
	}
	return 0;
}
int counts = 1;
int ty(int, int);
int main()
{
	int i, m, n, c;
	cin >> m;
	for(i = 1 ; i <= m ; i++)
	{
		cin >> n;
		counts = 1;
		c = ty(n, 2);
		cout << c << endl;
	}
	return 0;
}

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

	//??????????????????????;
	if (m>sqrt(n)) return 0;
    //????????????
	if (n%m==0) return fun(m+1,n)+fun(m,n/m)+1;
	else return fun(m+1,n);
    //????????????????????????????????????????+1?
	//??????????+1
}
//????????????
main(){
	int i,x,y;
	cin>>x;
	for (i=1;i<=x;i++){
	cin>>y;
	cout<<fun(2,y)+1<<endl;//??a=a???
	}
	return 0;
}
int main()
{
    int n,i,fenjie(int x,int y),*a,re=0,j;//x?????????y???????????
    scanf("%d",&n);
    a=(int*)malloc(n*sizeof(int));
    for(i=0;i<n;i++)
    {
                    scanf("%d",&a[i]);
                    
    }
    for(i=0;i<n;i++)
    {
                   printf("%d\n",fenjie(a[i],2)+1);
    }
    return 0;
}

fenjie(int x,int y)
{
           int i,flag=0,re=0,flag2=0,k=0;
           if(x<y) return 0;
           else if(x==y) return 0;
           else
           {
                for(i=y;i<x;i++)
                {
                                 if(x%i==0) flag2+=1;
                }
                if(flag2==0) return 0;    
                else
           {
                   for(i=y;i<=x;i++)
                   {
                                    if(x%i==0) 
                                    {
                                               re+=fenjie(x/i,i);
                                               if(x/i>=i) k+=1;
                                    }
                   }
                   re+=k;
                   return(re);
           } 
           }
}
/**
* @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);
		}
	}
}
void f(int,int);
int sum=0,res=1;
int main()
{
	int n,a,i,j;
	cin>>n;
	for(i=0;i<n;i++)		//n???
	{
		res=1;				//??????a=a
		cin>>a;
		for(j=2;j<=(int)sqrt((float)a);j++)			//??????
		{
			if(a%j==0)
			{
				sum=0;
				f(a/j,j);			//????????
				res+=sum;
			}
		}
		cout<<res<<endl;
	}
	return 0;
}
void f(int x,int y)
{
	if(x==1)
		sum++;
	while(y<=x)			//?????????????
	{
		if(x%y==0)
			f(x/y,y);
		y++;
	}
	return;
}
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;
}
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;
}
/*
 * 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;
}
int check(int i, int a)
{
	int means = 1; 
	if ( a == 1 )
		return 0; 
	if ( a == 2 )
		return 1; 
	for ( ; i <= (int)sqrt(a); i++ )
	{
		if ( a % i == 0 )
			means += check(i, a/i); 
	}
	return means; 
} 
int main()
{
	int n, i, a; 
	cin >> n; 
	for ( i = 1; i <= n; i++ )
	{
		cin >> a; 
		cout << check(2, a) << endl; 
	}
}
int total,p;
void part(int y){
	int i2,up;
	if (y==1) return;
	up=(int)sqrt(y);
	for (i2=2;i2<=up;i2++){
		if (p<=i2){
		    	if (y%i2==0){
			    	total++;
					p=i2;
				    part(y/i2);
					p=0;
			}
		}
	}
}
int main(){
	int n,i,a;
	scanf("%d",&n);
	for (i=1;i<=n;i++){
		total=0;
		p=0;
		scanf("%d",&a);
		part(a);
		printf("%d\n",total+1);
	}
	return 0;
}
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;
}
int f(int, int);
int main()
{
	int x, n, i;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> x;
		cout << f(x, 2) << endl;
	}
	
	return 0;
}


int f(int x, int i)
{
	int ans = 0;
	if (x == 2)
	{
		return 1;
	}
	else 
	{
		for (; i <= sqrt(x); i++)
		{
			if (x % i == 0)
			{
				ans = ans + f(x / i, i);
			}
		}
		return ans + 1;
	}
}
/*
 * fenjie.cpp
 *
 *  Created on: 2013-11-24
 *      Author: ??
 */
int num=0;
void fj(int m,int i){
	if(m==1)num++;
	else {
		for (int j=i;j<=m;j++){
			if(m%j==0)fj(m/j,j);
		}
	}
}
int main(){
	int n,m;cin>>n;
	for(int ii=0;ii<n;ii++){
		cin>>m;fj(m,2);
		cout<<num<<endl;
		num=0;
	}
	return 0;
}
int geshu;//????? 
void yinshu(int num,int a)//?????? 
{
     int i;//??? 
     if (num==1) geshu++;//?1?????? 
     else 
     {
          for(i=a;i<=num;i++)
          {
                              
                        if (num%i==0)//??????? 
                        {
                                                                //cout<<"neibu???"<<i<<" "<<endl;
                                     yinshu(num/i,i);//?num/i????? 
                        }
          }
     }
}
int main()
{
    int shu,j,num1[10000];//shu??????j??????num????? 
    cin>>shu;
    for(j=0;j<shu;j++)
    {
                      geshu=0;
                      cin>>num1[j];
                      //cout<<"???"<<j<<" "; 
                      yinshu(num1[j],2);//????? 
                      cout<<geshu<<endl;//?? 
    }
    cin.get();cin.get();cin.get();cin.get();cin.get(); 
    return 0;
}