niryuu/sni-each-converted huggingface dataset:
/*
 * 11.27.cpp
 *
 *  Created on: 2011-11-27
 *      Author: Administrator
 */
int coun;                    // ???????
void depart(int n,int i)
{
   int j;
   if (n==1) coun++ ;
   else for (j=i;j<=n;j++)       //???j?? ??????
	   if (n%j==0) {depart(n/j,j);}
}

int main (){
	int n,j;
	cin>>n;
	int b[n];                   //???????
	for(j=0;j<n;j++)
		cin>>b[j];
	for(j=0;j<n;j++)
		{
		coun=0;               //?????
		depart(b[j],2);
		cout<<coun<<endl;
		}
	return 0;
}

Output: 3
void main()
{
	int n,a[100],i;
	void fen(int a[],int x);
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	fen(a,n);
}
void fen(int a[],int x)
{
	int k,b=2,c,t;
	int look(int x,int y);
    for(k=0;k<x;k++)
	{
		c=a[k];
		t=look(c,b);
		printf("%d\n",t);
	}
}
int look(int x,int y)
{
	int total=1,p;
	if(x/y==0)
	{	return 0;}
	else
	{
		for(p=y;p<x;p++)
		{
			if(x%p==0)
			{
				total=total+look(x/p,p);
			}
		}
	}
	return total;
}
Output: 3
int prime(int n, int m )
{ 
	int i,total=1;
	if(n<m)return 0;
  
	for(i=m;i<=n;i++)
	{
		if(n%i==0)
			total+=prime(n/i,i);
	}
	return total;
}
void main()
{  
	int n,b[2000],b0,i;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{	
		scanf("%d",&b0);
		b[i]=prime(b0,2);
	}
	for(i=0;i<=n-2;i++)
	{
		printf("%d\n",b[i]);
	}
		printf("%d",b[n-1]);
}

Output: 3
/*
 *????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;}

Output: 1
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);
           } 
           }
}
Output: 4
int f(int x,int y) //???????????????y?????????x????????
{int i,num=0;
int a[100];
int sum=0;
	for(i=x;i<=sqrt(y);i++){
		if(y%i==0) {num++;a[num]=1+f(i,y/i);}} //??????
  for(i=1;i<=num;i++) {sum=sum+a[i];}
	      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;

}
Output: 4
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,??
			}
		}
	}
}


Output: 3
int f(int x,int y);// ??????x????????y????????????????? 
int main()
{
    int n,i,j,a,sum;
    cin>>n;
    for(i=1;i<=n;i++)//?? 
   {
      cin>>a;
      sum=0;     //??? 
    for(j=1;j<=a;j++)
     sum+=f(a,j);   //?? 
    
    cout<<sum<<endl;  //?? 
    
   }
    return 0;
    }
  int f(int x,int y)//??? 
  {
     int i,num=0;
     if(y==1)
       return 0;
    else
    {   
     if(x%y!=0) 
      return 0;
     else if(x==y)
      return 1;  
     else
    {
       for(i=y;i>=1;i--)      
         num+=f(x/y,i); //?? 
         
       return num;     
                 }
       
      }
      }  
    /* 
      ???????????? 
      ?100?? 
      sum=???? 
      f(100,100)=1   ??100=100 
      f(100,99) =0
      f(100,98)=0
      ....
      ....
      f(100,50)=f(2,50)+f(2,49)+........+f(2,2)+f(2,1) =1   ?????50????f(2,2)?1,?????? 
      ....
      ....
     f(100,2) =  f(50,2)+f(50,1)=f(25,2)+0=0
     f(100,1) =0
     ????? ?????????????? 
  */  
Output: 3
//*************************************************
//*file: 1000012912_006.cpp                       *
//*author: ???                                 *
//*date?2010.12.01                               *
//*function?????                             *
//*************************************************
int sum(int);                      //sum??????????a=a?
int g_count, g_j;                        //count???-1,j?????
int main()
{
	int n, a, i;                        //n????a?????
	cin >> n;
	for ( i = 0; i < n; i ++ )
	{
		g_count = 0;
		g_j = 2;
		cin >> a;
		cout << sum(a) + 1 << endl;
	}
	return 0;
}
int sum( int a)
{
	int i, b;
	b = (int)sqrt( (double)a );
	for ( i = g_j; i <= b; i++ )           
	{
		if ( a % i == 0 )                  //?a??i????????????1
		{
			g_j = i;                       //j??i???????
			g_count++;
			sum( a / i );		
		}
	}
	return g_count;
}
	
Output: 2
/*
 *?????
 *???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;
	}
}
Output: 5
//*****************************
//* ???????            *
//* ??????              *
//* ???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);//???????????????????
		}
	}
}

Output: 1
//*********************************
//* 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;
}

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

}

Output: 3
int countt;
void f(int p,int q)
{
	for(int m=p;m<=sqrt(q);m++)
	{
		if(q%m==0)
		{countt++;
		f(m,q/m);}
	}
   
}
int main()
{   
	int n,num,i;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>num;
		countt=0;
		for(int k=2;k<=sqrt(num);k++)
		{   
		    if(num%k==0)
			{
				countt++;
			   f(k,num/k);
			}
		}
		cout<<countt+1<<endl;;
	}
	return 0;
}
Output: 3
int tot;

void find(int m,int n)
{
    int i,j,k;
    if (m==1) tot=tot+1;
    else 
    {
        for (i=n;i<=m;i++)
        if(m%i==0)
           find (m/i,i);         
    }
}

int main()
{
    int i,j,k,m,n;
    cin >>n;
    for (i=1;i<=n;i++)
    {
        tot=0;
        cin >>m;
        find(m,2);
        cout <<tot<<endl;    
    }    
    cin >>n;
    return 0;
}

Output: 2
/*????
 * divide.cpp
 *
 *  Created on: 2011-12-1
 *      Author: WJ
 */

int sum=1;                            //?????1?????
void f(int b,int a)                        //??????????????
{
	for(int i=b;i<=a;i++){           //????????
	if((a%i==0)&&(i<=a/i)){
		sum=sum+1;                   //???1
		f(i,a/i);                         //???????????
	}
	if(i>a/i)  break;
	}
}
int main()
{
	int a,n;
	cin>>n;
	while(n>0){                //??????
		cin>>a;
		sum=1;
		f(2,a);                  //????
		cout<<sum<<endl;         //????
		n--;
	}
	return 0;
}

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

Output: 3
/*
 * 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 --;
	}
}

Output: 0
int factor(int a,int min)
{
	int count=0;
	for(int i=min;i<=a;i++)
	{
		if(i==a)
		{
			count+=1;
		}
		if(a%i==0)
		{
			count+=factor(a/i,i);
		}
	}
	return count;
}
int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		int a;
		cin>>a;
		int result=factor(a,2);
		cout<<result<<endl;
	}
	return 0;
}

Output: 1
int n, a, cnt = 0, num;
int decompose(int x, int y)
{
    int i, xnum = 1;
    if(x == 1)
        return 0;
    if(x == 2)
        return 1;
    for(i = y; i <= (int)sqrt(x); i++)
        if(x % i == 0)
            xnum += decompose(x / i, i);
    return xnum;
}
int main()
{
    cin >> n;
    while(cnt < n)
    {
        cin >> a;
        num = decompose(a, 2);
        cout << num << endl;
        cnt++;
    }
    return 0;
}

Output: 1
/*
 * 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;
}

Output: 4
/*
 * 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;
}  //????

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

Output: 2
int t;//t???
void f(int n,int d)//n?????d???
{
	int i;
	if(n==1)//
		t++;
	else
	{
		for(i=d;i<=n;i++)
		{
			if(n%i==0)
			{
				f(n/i,i);
			}
		}
	}
}
int main()
{
	int number[100];
	int n,i;
	int result[100];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>number[i];
	}
	for(i=0;i<n;i++)
	{
		t=0;
		f(number[i],2);
		result[i]=t;
	}
	for(i=0;i<n;i++)
	{
		cout<<result[i]<<endl;
	}
	return 0;
}
			

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

Output: 3
int s=0;

void find(int min,int dev)
{
    int i;
    for(i=min;i<=sqrt((float)dev);i++)
       if(dev%i==0)
          {
                 s++;
                 find(i,dev/i);
          }
}

int main()
{
    int n,i,m,j;
	scanf("%d",&m);
	for(j=1;j<=m;j++){
    scanf("%d",&n);
    for(i=2;i<=sqrt((float)n);i++)
        if(n%i==0)
          {
                 s++;
                 find(i,n/i);
          }
		printf("%d\n",s+1);s=0;}
    //getchar();
    //getchar();
	return 0;
}
Output: 3
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];
             }
            }
}

            
 

Output: 3
//*****************************************************
//*?????????.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);
		}
	}
}
Output: 3
/*
 * ???? .cpp
 *
 *  Created on: 2012-11-27
 *      Author:??
 *      ???????a?????????????????a = a1 * a2 * a3 * ... * an?
 *      ??1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
 */

int answer = 0;//???????
void f(int n, int N) {
	if (n < N)
		N = n;//????????????
	if (N == 1) {
		answer++;//??????
		return;
	}
	while (N > 1) {
		if (n % N == 0)
			f(n / N, N);//?????,?????
		N--;//??????
	}
}

int main()
{
	int n , a ;
	cin >>  n ;        //????n
	for ( int i = 0 ; i < n ; i++ )
	{
		cin >> a ;
		f( a , a ) ;              //????
		cout << answer << endl ;
		answer = 0 ;                   //????
	}
	return 0 ;
}

Output: 1
/*int hf[32768][32768]={0};
int work(int m,int n)
{
	if(hf[m][n]!=0)
	return hf[m][n];
	if(m%n!=0)
	{
		hf[m][n]=0;
		return 0;
	}
	for(int i=n;i<=m/n;i++)
	hf[m][n]+=work(m/n,i);
	return hf[m][n];
}*/
int work(int m,int n)
{
	if(m==n)
	return 1; 
	if(m%n!=0)
	return 0;
	int sum=0;
	for(int i=n;i<=m/n;i++)
	sum+=work(m/n,i);
	return sum;
}
int main()
{
	int n,m,a;
	cin>>n;
	int i,j,k;
	for(i=1;i<=n;i++)
	{
		cin>>m;
		int s=0;
		for(j=2;j<=m;j++)
		s+=work(m,j);
		cout<<s<<endl;
	}
	return 0;
}

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

Output: 3
int make(int x,int t)
{
	int ans=0,i;
	if (x==1) return 1;
	for (i=t;i<=x;i++)
	if (x%i==0) ans+=make(x/i,i);
	return ans;
}
int main()
{
	int i,k,j,p,n,t,m,x;
	scanf("%d",&t);
	for (p=1;p<=t;p++)
	{
		scanf("%d",&n);
		x=make(n,2);
		printf("%d\n",x);
	}
} 
Output: 2
int main()
{
	int f(int k,int m);
	int n;
	scanf("%d",&n);
	int i;
	for(i=1;i<=n;i++)
	{
		int k;
		scanf("%d",&k);
		printf("%d\n",f(k,2));
	}

	return 0;
}
int  f(int k,int m)
{   
	int i;
	int j=0;
	if(k<=m)
	{
		if(k==m){

		j=1;
		return j;
		}
		else 
		{
			j=0;
			return j;
		}
	}
	else
	{
	for(i=m;i<=k;i++)
	{
		if(k%i==0&&k/i!=1)
			j=j+f(k/i,i);
		if(k%i==0&&k/i==1)
			j=j+1;
	}
	return j;
	}

}
Output: 2
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));
}                                               
                       
Output: 3
int chu(int i,int n);
int main()
{
	int n,m,i,j;
	int sum[100];
	scanf("%d",&n);
	for(i=0;i<=(n-1);i++)
	{
		scanf("%d",&m);
		sum[i]=0;
		for(j=2;j<=sqrt(m);j++)
		{
			if(m%j==0)
			{
				sum[i]+=chu(j,m/j);
			}
		}
		
		
	}
	for(i=0;i<=(n-1);i++)
	{
		printf("%d\n",sum[i]+1);
	}
}
int chu(int i,int n)
{
	int j,m,t;
	t=1;
	m=n;
	for(j=i;j<=sqrt(m);j++)
	{
		if(m%j==0)
		{
		
          t+=chu(j,(m/j));
		}
	}
	return t;
}
Output: 4
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;
}

Output: 4
int devide(int n,int k)
{
	int s,i;
	s=1;
	for(i=k;i<=sqrt(n*1.0);i++)
	{
		if(n%i==0)
		{
			s=s+devide(n/i,i);
		}
	}
	return s;
}
int main()
{
	int n,a[200],i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(i==0)printf("%d",devide(a[i],2));
		else printf("\n%d",devide(a[i],2));
	}
	return 0;
}
Output: 2
int qq(int m){
    int i,j;
    j=0;
    for(i=2;i*i<=j;i++){
     if(m%i==0){
      j=1;
     break;
     }
     }
     return j;
     }
     
int pp(int m,int j){
   int i,k=0;
   if(m==1)
   return 1;
   else {
   k++;
   for(i=j;i*i<=m;i++){
    if(qq(i)==0&&m%i==0){
     k=k+pp(m/i,i);
     }
     }
   }  
  return k;   
}
      
int main(){
    int n,i,p;
    cin>>n;
    int aa[n+1];
    for(i=1;i<=n;i++){
    cin>>p;
    aa[i]=pp(p,2);
}
   for(i=1;i<=n;i++)
   cout<<aa[i]<<endl;

    return 0;
}
Output: 4
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);
   }
}
Output: 3
//????????
//??????
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;
}

Output: 3
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;
}
Output: 3
//????
//2010?12?03?
//1000012753 ???
int deal(int num, int p)
{
	int i, sum = 0;
	if(num == 1)
		return 1;
	for(i = p; i <= num; ++i)
		if(num % i == 0)
			sum += deal(num / i, i);
	return sum;
}
int main()
{
	int n, a;
	cin >> n;
	while(n--)
	{
		cin >> a;
		cout << deal(a, 2) << endl;
	}
	return 0;
}  

Output: 1
int im(int n,int max)
{
    int s=0,i;
    if(n==1)
    return 1;
    for(i=max;i>1;i--)
    if(n%i==0)
    s+=im(n/i,i);
    return s;
}
int main()
{
    int i,n,t;
    scanf("%d%d",&n,&t);
    printf("%d",im(t,t));
    for(i=1;i<n;i++)
    {
                    scanf("%d",&t);
                    printf("\n%d",im(t,t));
    }
    //getch();
    return 0;
}

Output: 2
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;
}
Output: 3
int sushu(int b)
{
	int flag=1,i;
	if(b==2)
		return 1;
	if(b%2==0)
		return 0;
	for(i=2;i<=b/2;i++)
	{
		if(b%i==0)
		{
			flag=0;
			break;
		}
	}
	if(flag==0)
		return 0;
	else 
		return 1;
}
int number(int a,int b)
{
	int i,total=1;
	if(sushu(a))
	{
		total=1;
		return total;
	}
	for(i=b;i<=a;i++)
	{
		
		if(a%i==0&&a/i>=i)
		{
			total=total+number(a/i,i);
		}
	}
	return total;
}
void main()
{
	int n,i,A[100],B[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&A[i]);
		B[i]=number(A[i],2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",B[i]);
	}
}
Output: 4
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);
     }
}


Output: 3
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;
}
Output: 2
int t;
void tot(int,int);
int main()
{

	int n,a[100],i;
	cin>>n;
	for(i=1;i<=n;i++)
	cin>>a[i];
	for(i=1;i<=n;i++) {
		t = 0;
		tot(a[i],2);
		cout<<t<<endl;
	}
	return 0;
}

void tot(int x, int min)
{	int k;
	if(x==1) {
		++t;
		return;
	}
	for(k=min;k<=x;k++)
		if(x%k==0)
		{
			tot(x/k, k);
		}
}
Output: 3
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;
}


Output: 2
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);
    }
}
Output: 1
/*
 * ????1118-4.cpp
 * ?????
 * ????: 2011-11-29
 * ??????????a?????????????????a = a1 * a2 * a3 * ... * an???1 < a1 <= a2 <= a3 <= ... <= an?????????????
 */
int divide(int n,int a)//n?????????a????????????????????
{
	int s=0,i;
	if(n==1) return 1;//n?1???
	for(i=a;i>1;i--)
		if(n%i==0)
			s+=divide(n/i,i);//???????
	return s;//??0??????????0??????????
}
int main()
{
	int n,k;
	cin>>k;//??????
	while(k>0)//???????
	{
		cin>>n;//????????
		cout<<divide(n,n)<<endl;//??????
		k--;//?????????
	}
	return 0;//????
}

Output: 1
/*
 * 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;
}

Output: 1
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;

}
Output: 1
int num = 1, i, factor;

void f(int factor, int x)
{
	for (; factor * factor <= x; factor++)
	{
		if (x % factor == 0)
		{
			num++;
			f(factor, x / factor);
		}
	}
}

int main()
{
	int a, n;
	cin >> n;
	while(n--)
	{
		cin >> a;
		f(2, a);
		cout << num << endl;
		num = 1;
	}

	return 0;
}

Output: 1
int count;
void f(int x,int y)
{
	int i=0;
	if(x>=y)
	for(i=y;i<=x;i++)
	{
		if(i==x)count++;
		if(x%i==0) f(x/i,i);
	}
}
main()
{
	int t;
	int n,i,x,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		count=0;
		scanf("%d",&x);
		f(x,2);
		printf("%d\n",count);
	}
}
Output: 2
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);}}
}
Output: 5
int zhi(int a);
int yin(int m,int t);
int main()
{
	int n,i=0;
	int str[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	scanf("%d",&str[i]);
	i=0;
	for(i=0;i<n;i++)
	printf("%d\n",yin(str[i],2));
return 0;
}

int zhi(int a)
{
	int k=2,flag=0;
	for(k=2;k<=a/2;k++)
	{
		if(a%k==0)
		{	flag=1;
			break;
		}
	}
	return flag;

}

int yin(int m,int t)
{
	int j=t,c=0,b=0,x=0;
	int str1[10000][2];
	if(m<t&&m!=1)
		return 0;
	  else if(m==1)
		  return 1;
	  else if(zhi(m)==0)
		  return 1;
	   else
		   for(j=t;j<=m;j++)
		 {
			 if(m%j==0)
			 { str1[c][0]=m/j;
			     str1[c][1]=j;
				 c++;
			

			 }
		 }
		 for(b=0;b<c;b++)
		 {
              x+=yin(str1[b][0],str1[b][1]);
		 }
		 return x;
}

Output: 5
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);
	}
}
Output: 1
int sum=0; 
int main()
{ void shu(int a,int b);
  int n=0,i=0,a=0,c=0,j=0;
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {  scanf("%d",&a);
     for(j=2;j<=sqrt((double)a);j++)
       { if(a%j==0)
         { sum=sum+1;
           shu(j,a/j);
				} 
			
			}

	printf("%d",sum+1);
	if(i<n)
	 printf("\n");
	sum=0;
  
  }
 
  return(0);
} 
void shu(int a,int b)
{ int i=0;
  for(i=a;i<=sqrt((double)b);i++)
    {  if(b%i==0)
         { sum=sum+1;
           shu(i,b/i);
				
				}		
		}
}
Output: 3
int sort(int, int, int);

int main()
{
	int t=0;
	cin>>t;
	int k=1;
	for (k=1;k<=t;k++)
	{
	int vacancy=0;
	int num=1;
	cin>>num;
	int i=1;
	int temp=num;
	for (i=2;i<=temp;i++)
	{
		while (temp%i==0)
		{
			vacancy=vacancy+1;
			temp=temp/i;

		}
		
	}
	cout<<sort(1,vacancy,num)<<endl;

	}
		return 0;
}

int sort(int start, int vacancy, int num)
{
	if (num<start)
		return 0;

	if (vacancy==1)
		return 1;
	
	int sum=0;
	int i=1;
	for (i=start;i<=num;i++)
	{
		if (num%i==0)
		{
			sum=sum+sort(i,vacancy-1,num/i);
		}
	}


	return sum;
}
Output: 3
int s=0,z=2;//?????? z?? ??????? 
void number(int x,int y)
{    //???? 
    int i;
	if(x==1) 
	{
		s=s+1;
	}//????1? ???? s+1
	for(i=y;i<=x;i++)
	{
		if(x%i==0) 
		{ 
			number(x/i , i);
		}//?????? 
	}


}
int main()
{
	int n,a,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		number(a,z);
		cout<<s<<endl;//???? 
		s=0;//S?0
	}
}

Output: 2
int fun(int i,int j,int count)
{
	int k;
	for (k=i;k<=sqrt(j);k++)
		if(j%k==0)
		{
			count++;
			count=fun(k,j/k,count);
		}
  return count;
}

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

     	printf("%d\n",count);
	}
	return 0;
}
Output: 3
int num=1,k=0;
int count(int n)
{
	for(int i=2;i<=sqrt(n);i++)
	{
		if(n%i==0&&i>=k)
		{
			num++;
			k=i;
			count(n/i);
			k=0;
		}
	}
	return (num);
}
int main()
{
	int i,n,a[100];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<n;i++)
	{cout<<count(a[i])<<endl;num=1;k=0;}
	return 0;
}
Output: 3
int f(int a, int b)
{
    int k = 0;
    if (a >= 2 * b)
    {
        for (int i = b; i <= a / b; i++)
        {
            if (a % i == 0 && a/i >= i)
            {
                k += f(a/i, i) + 1;
            }
        }
    }
    else
    {
        k = 0;
    }
    return k;
}

int main()
{
    int n, a, t;
    cin >> n;
    while (n--)
    {
        cin >> a;
        t = f(a, 2) + 1;
        cout << t << endl;
    }
    return 0;
}

Output: 1
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;
}
Output: 4
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;
}
Output: 1
int way(int x,int m)
{
	int sum=0,p=0,i;
	for(i=m;i<x;i++)
		if(x%i==0)
		{
			p++;
			sum=sum+way(x/i,i);
		}
		sum=sum+1;
	if(p==0) sum=1;
	if(m>x) sum=0;
	return(sum);
}
int main()
{
	int n,a,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a);
		printf("%d\n",way(a,2));
	}
	return 0;
}
Output: 2
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;
}

Output: 4
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));
       }
}
Output: 2
int get(int n,int m)//??????????????????n??????m??????
{
	if(n==1)return 1;//??n?1???????????1???
	while(m>=2)//?m?????????????????????????????????????
	{
		if(n%m==0)break;
		--m;
	}
	if(m==1)return 0;//??m?1??????????
	return get(n/m,m)+get(n,m-1);//?????????????????????????????????????n/m??????????
}
int main()
{
	int t;
	cin>>t;
	for(int i=0;i<t;++i)
	{
		int n;
		cin>>n;
		cout<<get(n,n)<<endl;	
	}
	return 0;
}

Output: 1
int cut(int m,int l){
	int sum=1;
	for(int i=l;i<=sqrt((double)m/l);i++){
		if((m/l)%i==0){
		sum+=cut(m/l,i);
		}
	}
	return sum;
}

int main (){
	int n;
        cin>>n;
for(int i=0;i<n;i++){
        int t=0;
        cin>>t;
	cout<<cut(2*t,2);
	if(i<n-1) cout<<endl;
}
	
}

Output: 2
//***************************************
//* ?????2010?12?01?            *
//* ?????????                  *
//* ?????         ???1000012902 *
//***************************************
int factors(int, int, int);                    //????factors?????????????
int main() 
{
	int num, n, i, j, b[10000];
	cin >> n;                                  //??????
	for (i = 0; i < n; i++) 
	{
		cin >> num;
		int part = 0;                          //??????????
		int t = num;                           //????

		//??????1????????????
		for (j = 2; j <= num; j++)
		{
			while (t % j == 0)
			{
				t /= j;
				part++;
			}
		}
		b[i] = factors(1, part, num);          //?????????????, ??????????
	}

	//?????????
	for (i = 0; i < n; i++)
	{
		cout << b[i] << endl;
	}
	return 0;
}

//factor1????????????????????factor1, part??????????????????????????, num???????? 
int factors(int factor1, int part, int num)
{
	int sum = 0;                               //????????0, ???0
	if (num < factor1)                         //?????????????????, ???0?????????????
		return 0;
	if (part == 1)                             //?????????, ??1??????????
		return 1;

	//???????????????????????????????????????????, ????????
	for (int i = factor1; i <= num; i++)
		if (num % i == 0)
			sum = sum + factors(i, part - 1, num / i);
	return sum;
}
Output: 4
int num;
void divide(int n,int n2)
{
	int i,m1;
	m1=(int)sqrt((double)n);
	for(i=n2;i<=m1;i++)
	{if(n%i==0)
	{num++;divide(n/i,i);}//?????????????????????????????
	}
}
int main()
{
	int n,i,m;
	cin>>n;
	for(i=0;i<n;i++)
	{
		num=1;
		cin>>m;
		
		divide(m,2);
		cout<<num<<endl;
	}
	return 0;
}
Output: 2
int means(int,int);
int main()
{
	int n,i=0;
	cin>>n;
	while(i<n)
	{
		int a;
		cin>>a;
		cout<<means(a,a)<<endl;
		i++;
	}
	return 0;
}



int means(int a,int b)
{
	int i,sum=0;
	if(a!=1)
	{
		for(i=b;i>=2;i--)
		{
			if(a%i==0)
			{
				sum=sum+means(a/i,i);              //?i????a??????a/i???a/i??????i????????????
			}
		}
		return sum;                  //?????a???????????
	}
	else
	{
		return 1;                       //?a=1?????????1
	}
}
Output: 1
int factorize(int n,int j)
{	
	int F=1;
	for(;j<=sqrt(n);j++)
		if(n%j==0)
			F+=factorize(n/j,j);
	return F; 
}
int main()
{
	int i,m,n[1000];
	scanf("%d",&m);
	for(i=0;i<m;i++)
		scanf("%d",&n[i]);
	for(i=0;i<m;i++)
		printf("%d\n",factorize(n[i],2));
	return 0;
}
Output: 3
//1000012915???
int f(int a,int min);
int main()
{
	int n,i,a,A[100];        //????

	cin>>n;
	
	for(i = 0;i < n;i++)     //??
	{
		cin>>a;
		A[i]=f(a,2);         //?2?????
	};

	for(i = 0;i < n;i++)cout<<A[i]<<endl; //??
	return 0;
}


int f(int a,int min)
{ 
	int result = 1; 
	int i;

	if(a < min)                 //?min?a?????????a????????
	{ 
		return 0; 
	} 
	
	for(i = min;i<a;i++)        //???????????????n???
	{ 
		if(a % i == 0)
		{ 
			result += f(a/i,i); //????????????????????????x???
		} 
	} 
	return result; 
} 
Output: 3
int num =0;
void fenjie(int n,int x)
{
	extern int num;
	if ( n == 1)
		num ++;
	else

	for(int i = x; i<=n;i++)
		if(n % i ==  0)
			fenjie(n/i,i);
}
int main()
{
int n,k;
cin >> k;
for(int j = 0;j!= k;j++)
{extern int num;
num =0;
cin >> n;
fenjie(n,2);
cout<<num<<endl;
}
return 0;
}
Output: 2
int d(int,int);
int main()
{
	int i,n,x;
	cin>>n;
	for(i=1;i<=n;i++)    
	{
		cin>>x;
		cout<<d(x,2)<<endl;    
	}
	return 0;
}
int d(int x,int y)
{
	int j,num=1;   
	if(x==1)
		return 0;    
	if(x==2)
		return 1;    
	for(j=y;j<=(int)sqrt((double)x);j++)
		if(x%j==0)
			num+=d(x/j,j);  
	return num;	   
}

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

Output: 2
int n, m, ans, a[20];

void calc(int dep, int x)
{
	if (x == 1)
	{
		ans++;
		return;
	}
	for (int i = a[dep-1]; i <= x; i++)
		if (!(x % i))
		{
			a[dep] = i;
			calc(dep + 1, x / i);
		}
}

int main()
{
	scanf("%d", &n);
	for (a[0] = 2;n; n--)
	{
		scanf("%d", &m);
		ans = 0;
		calc(1, m);
		printf("%d\n", ans);
	}
	return 0;
}
Output: 2
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);
		}
	}
}
Output: 1
int Digui(int a,int min)
{
	int i,result=1;
	if(a<min)
	{
		return 0;
	}
	for(i=min;i<a;i++)
	{
		if(a%i==0)
		{
			result+=Digui(a/i,i);
		}
	}
	return(result);
}
int main()
{
	int a[1000],n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",Digui(a[i],2));
	}
	return 0;
}



Output: 3
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;
	if(n<p) return 0;
	else{
		for(m=p;m<=n;m++)
			if(n%m==0){
				if(m<n) sum=sum+f(n/m,m);      //n?????m??????n/m??????m???????
				if(m==n) sum=sum+1;      //n?????n??????1
			}
			return sum; 
	}
}

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

Output: 1
int sum=0;
void recur(int N,int i)
{
    if(N==1) sum++;
    while(i<=N)
    {
        if(N%i==0) 
			recur(N/i,i);
        i++;
    }
    return ;
}
int main()
{
    int t=0;
    cin>>t;
    for(int k = 0; k < t; k++)
    {
        int n=0;
        cin>>n;
        int i=2,res=1;
        for(int i =2; i <=n/2;i++)
        {
            if(n%i==0)
            {
                sum=0;
                recur(n/i,i);
                res+=sum;
            }
        }
        cout<<res<<endl;
    }
    return 0;
}

Output: 2
int sum = 0;
void fenjie(int t,int n)
{
	int i = 0;
	if(n == 1)
	    sum++;
    for(i = t; i <= n; i++)
	{
		if(n % i == 0)
		{
			fenjie(i, n / i);
		}
	}
}
int main()
{
	int n = 0, k = 0;
	cin >> n;
	while(n > 0)
	{
		 cin >> k; 
         sum = 0;
		 fenjie(2,k);
		 n--;
		 cout << sum <<endl;
	}
	return 0;
}
Output: 1
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;
}
Output: 1
int s[100];
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; 
} 

main()
{int m,mm;
scanf("%d",&m);
for(int i=0;i<m;i++){
        scanf("%d",&mm);
/*for(int i=0;i<m+1;i++){s[i]=0;printf("%d",s[i]);}*/
 printf("%d\n",f(mm,2));}
 }

Output: 3
int f(int t) 
{
    double v=sqrt(t)+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);
    for(int i=0;i<n;i++) 
      {
      int a;
      scanf("%d",&a);
      if(f(a)>0) 
      {
      printf("1\n");
      continue;
      }
      int i=2,K=1;
      while(i<=a/2) 
      {
        if(a%i==0) 
        {
        sum=0;
        fun(a/i,i);
        K+=sum;
        }
        i++;
      }
        printf("%d\n",K);
      }
}
Output: 2
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;
}

Output: 3
//???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;
}

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

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

Output: 3
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;
}
Output: 3
int n,t,cnt;
void f(int left,int last){
	if(left<last) {if(left==1) cnt++;return;}
	for (int i=last;i<=left;i++) if(left%i==0) f(left/i,i);
}
int main(){
	scanf("%d",&t);
	while (t--){
		scanf("%d",&n);
		cnt=0;f(n,2);
		printf("%d\n",cnt);
	}
	return 0;
}

Output: 1
int m=2;
int manners(int a){//????????????
	int count=1,t=0;
	t=sqrt((double) a);
	for(int i=m;i<=t;i++){//?????????
		if(a%i==0){
			m=i;//?????????????????????
			count=count+manners(a/i);//?????????????????
		}
	}
	return count;//?????
}
int main(){
	int n, b;
	int i=1;
	cin>>n;
	while(i<=n){
		cin>>b;
		cout<<manners(b)<<endl;
		m=2;//?????
		i++;
	}
   return 0;
}
Output: 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;
}

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

void yinshu(int a,int x)
{
	if(a!=1)
	{
	for(int i=x;i<=a;i++)//?x?????
		if(a%i==0)//????
			yinshu(a/i,i);//?a/i??????????????i???
	}
	if(a==1)//????????????
		sum++;
}
Output: 2
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);
		}
	}
}

Output: 3
int g(int y)
{
	int i;
	for(i=0;;i++)
	{
		if(i*i>y)
			break;
	}
	return i-1;
}
int f(int x,int b)
{
	int p,a[100],t=0,k=0;
	p=g(x);
	if(x==2)
		return 0;
	else
	{
	for(int i=b;i<=p;i++)
	{
		if(x%i==0)
		{
			a[t]=i;
			t++;
		}
	}
	if(t==0)
		return 0;
	else
		for(int i=0;i<t;i++)
			k=k+f(x/a[i],a[i])+1;
		return k;
	}
}
int main()
{
	int n,a;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a;
		cout<<f(a,2)+1<<endl;
	}
	return 0;
}
Output: 4