#include<iostream>
#include<cmath>
using namespace std;
//用开根号,将时间复杂度降为nlogn
int divisor_count(int x)
{
int count = 0;
int n = sqrt(x);
for(int i = 1;i * i < x;i++)
if(x % i == 0)
count += 2;
if(n * n == x)//sqrt(x)为整数,count*2 + 1;否则,count*2
count++;
return count;
}
int main(void)
{
int n;
while(cin >> n)
{
while(n--)
{
int x;
cin >> x;
cout << divisor_count(x) << endl;
}
}
return 0;
}

京公网安备 11010502036488号