semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
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);
		}
	}
}
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;
}
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");
	}
}
int f(int,int);      //????
int main( )      //?????
{      //?????
	int n,i,a[50];
	cin >>n;      //??????
	for(i=0;i<n;i++){
		cin >>a[i];      //????
		cout <<f(a[i],2) <<endl;      //????
	}
	return 0;      //???????????????????
}      //?????
      
int f(int n,int p)      //????????????=p?????

{
	int sum=0,m;
	for(m=p;m<=n;m++)
		if(n%m==0){
			if(m<n) sum=sum+f(n/m,m);      //n?????m?????=n/i?????=m?????
			if(m==n) sum=sum+1;      //n?????n?????=1
		}
		return sum;      
}
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;
}
int m=0;
int main()
{
	void count(int a,int b);
	int r,i,k,n;
	scanf("%d",&r);
	for(i=0;i<r;i++)
	{
		scanf("%d",&n);
		for(k=2;k<=sqrt(n);k++)
		{
			if(n%k==0)
			{
				m++;
				count(k,n/k);
			}
		}
		printf("%d\n",m+1);
		m=0;
	}
}

void count(int a,int b)
{
	int j;
	double t=sqrt(b);
	for(j=a;j<=t;j++)
	{
		if(b%j==0)
		{
			m++;
			count(j,b/j);
		}
	}
}
int f(int i,int t)
{
	if(i<t)
	{return 0;}
	int b=1;
	int a;
	for(a=t;a<i;a++)
	{
		if(i%a==0)
		{b=b+f(i/a,a);}
	}
	return b;
}

int main()
{
	int n;
	scanf("%d",&n);
	int i=0;
	int d[100];
	do
	{
		scanf("%d",&d[i]);
		i++;
	}while(i<n);
	i=0;
	do
	{
		printf("%d\n",f(d[i],2));
		i++;
	}while(i<n);
	return 0;
}
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;
}
//
//  main.cpp
//  123
//
//  Created by blues cookie on 12-11-12.
//  Copyright (c) 2012? blues cookie. All rights reserved.
//

int calc(int a,int b)
{
    if(a*a>b) return 1;
    if(b%a==0) return (calc(a,b/a)+calc(a+1,b));
    return calc(a+1,b);
}
int main(int argc, const char * argv[])
{
    int n,a;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a;
        cout<<calc(2,a)<<endl;
    }
    return 0;
}
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;
}
//???2010?12?1?

//???1000010586_???

//???????

int m , num;
int make( int a );
int pan( int a );
int main()
{
	int n , a , i;
	cin >> n;
	for( i = 1 ; i <= n ; i++ )
	{
		cin >> a;
		num = 0;
		m = a;
		cout << make( a ) << endl;
	}
	return 0;
}
int pan( int a )
{
	int n = 0 , i;
    for ( i = 1 ; i <= sqrt( a ) ; i ++ )
	{
		if ( a % i == 0 )
			n++;
	}
    if ( n == 1 )
		return 0;
	else
		return 1;
}
int make( int a )
{
	int i , j , ans;
	ans = sqrt( a );
	if ( pan( a ) == 0 )
	{
		num++;
		return num;
	}
	else
	{
		num++;
		for ( i = m / a ; i <= ans ; i++ )
		{
			if ( i == 1 ) continue;
			if ( a % i == 0 )
			{
				m = a;
			    num = make( a / i );
			}
		}
		if ( i == ans + 1 )
			return num;
	}
	return num;
}
/*
 *????HW7_10.cpp
 *??????1100019007?
 *???2012-11-14 
 *???1090 ???? 
 */ 
int factorize(int m,int k)
{
    int c=1;//a=a??? 
    if(m<4)return 1;//?m??4??1 
    for(int i=k;i<=sqrt(m);i++)if(!(m%i))c+=factorize(m/i,k>i?k:i);//????????????????an>an-1,???k???
    return c;//????? 
}
int main(int argc, char *argv[]){
    int n,m;
    cin>>n;
    while(n--){
        cin>>m;//????
        cout<<factorize(m,2)<<endl;//????
    }
    return 0;}
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);
}
void qut(int a,int b);                                       //????
int num=0;                                                    //?????????
int main()
{
	int i,n,g[1000];                                         //?????????
	cin>>n;
	for(i=0;i<n;i++)                                         //??????
		cin>>g[i];
	for(i=0;i<n;i++)
	{
	    qut(g[i],1);                                         //????
		cout<<num<<endl;
              num=0;
	}
	return 0;
}

void qut(int a,int b)		
{
	int i;
	if (a>=b)		
	{
		num++;		
		if (b==1)	                                     
			b++;
		for (i=b;i<=a;i++)	
		{
			if (a%i==0)	
			{
				qut(a/i,i);	                                //??a%i==0,??
			}
		}
	}
}
int sum=0;
void f(int x,int y)
{
	if(x==1)
		sum++;
	while(y<=x)
	{
		if(x%y==0)
			f(x/y,y);
		y++;
	}
}
int main()
{
	int n,i,a;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		int j=2,num=1;
		while(j<=a/2)
		{
			if(a%j==0)
			{
				sum=0;
				f(a/j,j);
				num+=sum;
			}
			j++;
		}
		printf("\n%d",num);
	}
	return 0;
}
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;
}
int num(int a,int b);
int main()
{
	int t;
	int a;
	cin>>t;
	for(int i=1;i<=t;i++)            //??
	{
		cin>>a;                      //????
		cout<<(num(a,2))<<endl;      //????
	}
	return 0;
}
int num(int a,int b)
{
	int f=0;
	if(a>=b)                    //????????????
	{
	for(int i=b;i<=a;i++)       //????
	{
			if(a==i) f++;
			else if(a%i==0) f=f+num(a/i,i);     //???????????
	}
	}
	return f;
}
int f(int a,int c);
int j,b;
int main()
{
	int i,n,m;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&m);
		printf("%d\n",f(m,2));
	}
	return 0;
}
int f(int a,int c)
{
	int j,b=0;
	for(j=c;j<=sqrt(a);j++)
	{
		
		if(a%j==0)
		{
			b=b+f(a/j,j);
		}
	}
	return b+1;
}
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;
}
int fjys(int x,int y)
{
	if(x<y)
		return 0;
	int i,n=1;
	for(i=y;i<x;i++)
	{
		if(x%i==0)
		{
			n+=fjys(x/i,i);
		}
	}
	return n;
}
int main()
{
	int n,a[100];
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		cout<<fjys(a[i],2)<<endl;
	}
	return 0;
}
int divide(int d,int n)
{
	int sum=0;
	for(int i=d;i<n;i++){
		if (n%i==0&&(n/i)>=i){
			sum=sum+1;
			sum=sum+divide(i,n/i);}}
	return (sum);
}
int main()
{
	int n,num;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>num;
		cout<<divide(2,num)+1<<endl;}
	return 0;
}
int main()
{
	int f(int p,int q,int t);

	int n,i;
	int g[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&g[i]);
	for(i=0;i<n;i++)
	{
		printf("%d\n",f(2,g[i],1));
	}


	return 0;
}

int f(int p,int q,int t)
{
	int h[100][100];
	int i,k=0;
	for(i=p;i*i<=q;i++)
	{
		k=0;
		if(q%i==0)
		{
			h[k][0]=i;
			h[k][1]=q/i;
			k++;
			if(k!=0)
			{
				t=f(h[k-1][0],h[k-1][1],t);
			}
			
		}
		t=t+k;
	}
	return t;
}
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;
	}
}
int k=0;
int y;
int a(int x,int i);
void b(int x,int i);
int main()
{
	int n,i,x,z;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&x);
		y=x;
		printf("%d\n",a(x,2));
	}
	return 0;
}
int a(int x,int i)
{
	k=0;
	b(x,i);
	return k;
}
void b(int x,int i)
{
	for(i=i;i<=x;i++)
	{
		if(x%i==0) b(x/i,i);
	}
	if(x==1) k=k+1;
}
int sum;
int yin(int c,int g)//?????
{
    int j,k,f,e;
    for(j=g;j<=c;j++)//??
    {
        if(c%j==0)
        {
           e=c/j;
            if(e>1)
            {
                f=j;
                yin(e,f);
            }
            else sum++;//?????????
        }
    }
    return sum;//??
}
int main()
{
    int n,a[1000],b[1000],i,d;
    cin>>n;
    for(i=0;i<n;i++) cin>>a[i];//??
    for(i=0;i<n;i++) {d=2;sum=0;b[i]=yin(a[i],d);}
    for(i=0;i<n;i++) cout<<b[i]<<endl;//??
    return 0;

}
/*???????a?????????????????a = a1 * a2 * a3 * ... * an???1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
????
?1?????????n?????n???????????1?????????a (1 < a < 32768)
????
n???????????????????????????????????
????
2
2
20
????
1
4*/
int ct;
int count(int n, int p)
{
        int i;
        if(n==1) ct++;
        for(i=p;i<=n;i++)
        if(n%i==0) count(n/i,i);
}
int main()
{
        int n,m,i;
        cin>>m;
        for(i=1;i<=m;i++)
        {
                ct=0;
                cin>>n;
                count(n,2);
                cout<<ct<<endl;
        }
}
/*
 * ????@.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;//???????????????????
}//????
int f(int x,int y)
{
	int a,n=1;
	for(a=y;a<=sqrt(x);a++)
	{
		if(x%a==0)
		{
			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]=f(x[i],2);
	}
	for(i=0;i<m;i++)
	{
		printf("%d\n",n[i]);	
	}
	return 0;
}
int f(int a,int b)
{
	if(a==b)return 1;
	if(b>a)return 0;
	if(a%b!=0)return f(a,b+1);
	if(a%b==0)return f(a,b+1)+f(a/b,b);
}
int main()
{
	int n=0,i=0,x,y;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>x;
		y=2;
		cout<<f(x,y)<<endl;
	}
	return 0;
}
void count(int, int);
int k;

int main()
{
	int n, i, j, m;
	int num;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		k = 0;
		cin >> num;
		m = sqrt(num) + 1;
		for (j = 2; j < m; j++)
			if (num % j == 0)
			{
				k++;
				count(num / j, j);
			}
		cout << k + 1 << endl;
	}
	return 0;
}
void count(int num, int i)
{
	int j;
	int n = sqrt(num);
	for (j = i; j <= n; j++)
	{
		if (num % j == 0)
		{
			k++;
			count((num / j), j);
		}
	}
}
void account (int ,int);
int p;
int main()
{
	int m;
	int n;
	cin>>n;
	while(n>0)
	{
		p=0;
    cin>>m;
account(m,1);
cout<<p<<endl;
n--;
	}
return 0;
}
void account (int m,int i)
{
if(m==1)
    p++;
else for(int j=2;j<=m;j++)
	{
	if((m%j==0)&&(j>=i))
     account(m/j,j);
	}
}
int f(int m,int min);					//????????
int main()
{
	int n,i,a[100],sum[100];
	cin>>n;								//??????
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n;i++)
	{
		sum[i]=f(a[i],2);				//??????????????
		cout<<sum[i]<<endl;
	}
	return 0;
}

int f(int m,int min)					/*???????????????????????????
										??????????????*/
{
	int i,sum=0;
	if(m==min||m==1)					//???????????????????1???1?					
		return 1;
	else if(m<min)						//????????????????????
		return 0;
	else if(m>min)						//??????????????????????????????????
	{	for(i=min;i<=m;i++)
			if(m%i==0)
				sum+=f(m/i,i);
		return sum;
	}
}
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);
}
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;
	
}
//????????
//??????
int f(int a,int m)                 //???a???????m?????????
{ 
if(a<m) 
return 0; 
int kind=1; 
for(int i=m;i<a;i++)
{ 
if(a%i==0)                         //??????????????
kind=kind+f(a/i,i); 
} 
return kind; 
} 
int main()
{
	int n,a[100];
	cin>>n;
	for(int i=0;i<n;i++)     //??n???
		cin>>a[i];
	for(int i=0;i<n;i++)
		cout<<f(a[i],2)<<endl;    //????
	return 0;
}
/*
 * huisu.cpp
 *   ????
 *  Created on: 2010-11-26
 *      Author: ???
 */

int a=0,i=0,sum=1;                          //sum?????????????????????????1
void f(int i,int a) {                       //f????????
	int j;
	for(j=i;j<=sqrt(a);j++)
		if(a%j==0) {sum++; f(j,a/j);}        //?a??j?????????1????????????,????
}                                            //???j??????????????3*13?13*3
int main(){
	int n;
	cin>>n;
	while (n){
		cin>>a;
		f(2,a);
		cout<<sum<<endl;
		n--;
		sum=1;       //??sum
	}
}
int main()
{
	int n, t;
	cin >> n;
	for(t = 0;t < n;t++)
	{
		int m;
		cin >> m;
		int f(int a,int min);
		cout << f(m, 2) << endl;
	}
    return 0;
}
int f(int a, int min)
{
	int i = min;
	if(a < min)
	{ 
		return 0; 
	} 
	int result = 1; 
	while(i < a)
	{ 
		if(a % i == 0)
		{ 
			result += f(a / i,i); 
		}
		i++;
	}
	return result; 
}
int f(int a,int x)
{
	int count=1,i;
	for(i=x;i<a;i++)
		if(a%i==0)
			count+=f(a/i,i);
	if(i==a)
		return count;
	else
		return 0;
}

void main()
{
	int n,a;
	scanf("%d",&n);
	for(;n>0;n--)
	{
		scanf("%d",&a);
		if(a==1||a==2)
			printf("1\n");
		else
			printf("%d\n",f(a,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;
}
int Factorization(int,int);
int main()
{
    int n=0,num=0;
    cin>>n;
    for(int i=0;i<n;i++)
      {
          cin>>num;
          cout<<Factorization(num,2)+1<<endl;
      }
      return 0;
}


int Factorization(int num,int n)
{
    int count=0;
    for(int i=n;num/i>=i;i++)
       if(num%i==0)
       {
           count++;
           count=count+Factorization(num/i,i);
       }
    return count;
}
int fenjie(int ,int );
int main()
{
	int i,n,t,r,num;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>num;
		r=fenjie(num,2);
		cout<<r<<endl;
	}
	return 0;
}
int fenjie(int num,int min)
{
	int i,j,k,r=0;
	for(i=min;i<=num;i++)
	{
		if(num%i==0)
		{
			r=r+fenjie(num/i,i);
		}
		if(i==num) r++;
	}
	return r;
}
//*****************************************************
//*?????????.cpp                             *
//*??????                                       *
//*?????2010?12?8?                            *
//*????????????????                   *
//*****************************************************
int answer=0;//???????
int a=2;//???2????
void f(int,int);//?????
int main()//???
{
	int n=0;
	int i=0;
	int data[100]={0};
	cin>>n;//????
	for(i=0;i<n;i++)
	{
		cin>>data[i];
	}
	for(i=0;i<n;i++)
	{
		f(data[i],a);
		cout<<answer<<endl;
		answer=0;//??
	}
}
void f(int m,int n)//???
{
	int i=0;
	if(m==1)//??????1 ?????????
	{
		answer=answer+1;
	}
	for(i=n;i<=m;i++)//???2?????
	{
		if(m%i==0)
		{
			f(m/i,i);
		}
	}
}
/*
 * 1090 ????.cpp
 *
 *  Created on: 2010-11-26
 *      Author: ???
 */
int f(int a,int min)               //???a???????min??????
{
	int j,num;                     //j????num????
	if (a<min) return 0;           //??a??min?????????????
	num=1;                         //???????
	for (j=min;j<a;j++)            //????????
		if (a%j==0) num=num+f(a/j,j);           //???????????
	return num;                    //????
}

int main()
{
	int n,i,out,a;                //n???????out???????a??????
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>a;
		out=f(a,2);               //??????
		cout<<out<<endl;
	}
	return 0;
}
/*
*????111120 04.cpp
*??????
*?????2011-11-22
*?????????????
*/

int g=0;     //?????????
void s(int n,int z)     //????
{
    for(int i=2;i<=sqrt(n);i++)     //????????????
    {
    	if(n%i==0&&i>=z)
    	{
    		g=g+1;
    		s(n/i,i);
    	}
    }
}
int main()     //???
{
	int a,b;
	cin>>a;     //????
	while(cin>>b)    //??????
	{
		for(int j=2;j<=sqrt(b);j++)     //????????????
		{
			if(b%j==0)
			{
				g=g+1;
				s(b/j,j);     //??????
			}
		}
		cout<<g+1<<endl;     //???
		g=0;     //????
	}
	return 0;     //??
}
int f(int n,int m)
{
	int sum=1,i;
	if(n<m)
		sum=0;
	else 
		if(n==m)
			sum=1;
	else 
	{
		for(i=m;i<=n;i++)
			if(n%i==0)
				sum=sum+f(n/i,i);
	}
	return(sum);
}
void main()
{
	int x,j,a[100000];
	scanf("%d",&x);
	for(j=0;j<x;j++)
		scanf("%d",&a[j]);
	for(j=0;j<x;j++)
		printf("%d\n",f(a[j],2));
}
int turn(int a,int b)
{
	int i,k;
	if(a==1) k=1;
	else if(a<b) k=0;
	else
	{
		k=0;
		for(i=b;i<=a;i++)
			if(a%i==0)
				k=k+turn(a/i,i);
	}
	return k;
}
int main()
{
	int n,i,a[1000],t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		t=turn(a[i],2);
		printf("%d\n",t);
	}
	return 0;
}
int times;
void fenjie(int m,int k)
{
	int i;
	{
		for(i=k;i<=sqrt(m);i++)
		{
			if(m%i==0)
			{
				fenjie(m/i,i);
			}
		}
	}
	times++;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		int m;
		times=0;
		scanf("%d",&m);
		fenjie(m,2);
		printf("%d\n",times);
	}
}
int ways(int, int);
void main()
{
	int ways(int a, int min);
	int n,b;
	scanf("%d",&n);
	while(n-->0)
	{
		scanf("%d",&b);
		printf("%d\n",ways(b,2));
	}
}			
int ways(int a, int min)
{
	if(a<min) return 0;
	int sum=0, i;
	for(i=min;i<=sqrt(a*1.0);i++)
	{
		if(a%i == 0)
			sum = sum + ways(a/i, i);
	}
	return sum+1;
}
int main()
{
	int brea(int a,int min);
	int i,n,a;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",brea(a,2));
	}
}

int brea(int a,int min)
{
	int result=1;
	int i;
	if(a<min)
		return(0);
	else if(a==min)
		return(1);
	else
	{
	for(i=min;i<a;i++)
	{
		if(a%i==0)
		{
			result=result+brea(a/i,i);
		}
	}
	return(result);
	}
}
int f2(int i,int a)
{
	int c,s=0;
	for(i;i<=a/2;i++)
	{
		if(a%i==0)
		{
			c=a/i;
			if(c>=i)
			{
				s=s+f2(i,c);
			}
		}
		

	}
	s=s+1;
	return s;
}

int f(int a)
{
	int s=0;
	
	s=s+f2(2,a);
    return s;
}


int main()
{
	int n,i,a,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		b=f(a);
		printf("%d\n",b);

	}

	return 0;
}
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;
}
int fenjie(int max,int min)
{
    int num=1,i,k;
    for(i=min;i<max/2;i++)
    {
        k=max%i;
        if(k==0)
        {
            if(i<=max/i)
            num+=fenjie(max/i,i);
        }
    }
    return num;
}
int main()
{
    int a[10000],n,j;
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
        scanf("\n%d",&a[j]);
    }
    for(j=0;j<n;j++)
    {
        printf("%d\n",fenjie(a[j],2));
    }
    return 0;
}
int sum=0;
void f(int n,int y)
{
	int a=sqrt(n);
	for(int i=y;i<=a;i++)
	{
		if(n%i==0)
		{
			sum++;
			y=i;
			f(n/i,y);
		}
	}
}
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int num;
		cin>>num;
		sum=0;
		f(num,2);
		cout<<sum+1<<endl;
	}
	return 0;
}
int divmet(int n,int i);   
int main()
{
    int n=0;  //????? 
    int t=0;  //???? 
    int sum;  //??????? 
    cin>>t;  
    for(int i=0;i<t;i++)
    {
        sum=0;
        cin>>n;
        for(int j=2;j<=n;j++)    
        {
            sum=sum+divmet(n,j);
        }
        cout<<sum<<endl;
    }
    return 0;
}
int divmet(int n,int i)    
{
    int num=0;
    if(n%i==0)
    {
        if(n==i)       
        {
            return 1;
        }
        for(int j=2;j<=i;j++)
        {
             num=num+divmet(n/i,j);   //?? 
        }
           return num;
    }
        
    else
    {
        return 0;
    }               
}
/*
 *?????
 *???2010 - 12 - 07
 *?????????  ????
 */
int num(int,int,int);
int qufen(int);
int power(int,int);
int main()
{
	int t;
	cin >> t;
	while(t >= 1)
	{
		int n,i,x,sum = 1;
		cin >> n;
		x = qufen(n);                  //qufen????????????????????
		for(i = 2; i <= x; i++)
			sum = sum + num(n,i,2);      //num?????????????i????????
		cout << sum << endl;
		t--;
	}
	return 0;
}
int qufen(int n)
{
	int j;
	for(j = 1; ; j++)
	{
		if(power(2,j) > n)
		{
			return j - 1;
			break;
		}
	}
}
int power(int a,int b)
{
	int sum = 1,k;
	for(k = 1; k <= b; k++)             //?????????
		sum = sum * a;
	return sum;
}
int num(int n,int g,int h)
{
	if((g == 1)&&(n >= h))          //???????
		return 1;
	int i,j = 0,count = 0,a[20000];  
	for(i = h; i < n; i++)                 //???????????? n ?? i ?? g ??????n / i????? g - 1?
	{                                      //?n = i * ?g?? ???? n / i = h * (g - 1 ???h??????i???
		if(n % i == 0)
		{
			a[j] = i;
			j++;
		}
	}
	if(j == 0)                     //j == 0?????????????????
		return 0;
	else
	{
		for(i = 0; i < j; i++)
			count = count + num(n / a[i],g - 1,a[i]);
		return count;
	}
}
int fj(int a,int zs){
	int k,n,z;
	n=0;z=0;
    for(k=zs;k<=sqrt(a);k++){
		if(a%k==0){n=n+fj(a/k,k);
		z=1;}
	}
		if(z==0){return 1;}
		else{return n+1;}
}
int main(){
	int m,i,t;
    scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&t);
		printf("%d\n",fj(t,2));
	}
	return 0;
}
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;
}
int fenjie(int x,int p);
int N;
int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	 {scanf("%d",&N);
	  printf("%d\n",fenjie(N,2));
	 }
	return 0;
}
int fenjie(int x,int p)
{
	int f=0;
	if(x==1)
	 return 1;
	else
	 {for(int i=p;i<=x;i++)
	   if(x%i==0)
	    f=f+fenjie(x/i,i);
	 }
	return f;
}
int yinshu(int num,int min);
int main(){
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     int a,result;
                     scanf("%d",&a);
                     result=yinshu(a,2)+1; 
                     printf("%d\n",result);
                     }
    return 0;
}

int yinshu(int num,int min){
    int r,x=0;
    if(num<min){
                return 0;
                }
    else{
         for(r=min;r*r<=num;r++){
                         if(num%r==0){
                                      x=x+1+yinshu(num/r,r);
                                      }                         
                         }
    return x;
}}