Link to this code: https://cses.fi/paste/9633ccd95d482e4965a0b2/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl "\n"
const int MOD = 1e9 + 7;
ll check[1000001];
void divisors(ll x){
	ll cnt = 0;
	for (ll i = 1; i <= sqrt(x); i++){
		if (x % i == 0){
			cnt++;
			if (x / i != i) cnt++;
		}
	}
	check[x] = cnt;
	cout << cnt << endl;
}
int main(){
	fast
	int n;
	cin >> n;
	while (n--){
		ll x;
		cin >> x;
		if (check[x] == 0){
			divisors(x);
		} else cout << check[x] << endl;
	}
}