#include<iostream>
#include<math.h>
#include<vector>

using namespace std;

//两种选其一
const int MAXN=35000;
//const int MAXN=sqrt(1e9)+1;

bool isPrime[MAXN];
vector<int> prime;

void Init() 
{
    for(int i=0; i<MAXN; i++) 
    {
        isPrime[i]=true;
    }
    isPrime[0]=false;
    isPrime[1]=false;
    for(int i=2; i<MAXN; i++) 
    {
        if(!isPrime[i])continue;
        prime.push_back(i);
        for(int j=i*i; j<MAXN; j+=i) 
        {
            isPrime[i]=false;
        }
    }
}

int Numberoffactor(int num)
{
    vector<int> exponent;
    for(int i=0; i<prime.size(); i++) {
        int factor=prime[i];
        if(num<factor)
        {
            break;
        }
        int current =0;
        while(num%factor==0) 
        {
            num/=factor;
            current++;
        }
        exponent.push_back(current);
    }
        if(num>1)
        {
            exponent.push_back(1);
        }
        int answer=1;
        for(int i =0;i<exponent.size();++i)
        {
            answer*=exponent[i]+1;
        }
    return answer;
}
int main() {
    Init();
    int n;
    while(scanf("%d",&n)!=EOF) 
    {
        if(n==0){
            break;
        }
        for (int i=0;i<n;++i){
            int number;
            scanf("%d",&number);
            printf("%d\n",Numberoffactor(number));
        }
    }
    return 0;
}