import sys def main(): input = sys.stdin.read().split() T = int(input[0]) queries = list(map(int, input[1:T+1])) max_n = 10**5 # Initialize smallest prime factors (SPF) spf = list(range(max_n + 1)) for i in range(2, int(max_n**0.5) + 1): if spf[i] == i: # i is a prime for j in range(i*i, max_n + 1, i): if spf[j] == j: spf[j] = i # Precompute albedo values alb = [0] * (max_n + 1) for n in range(1, max_n + 1): if n == 1: alb[n] = 0 else: temp = n product = 1 while temp != 1: p = spf[temp] exponent = 0 while temp % p == 0: exponent += 1 temp //= p product *= (exponent // 2 + 1) alb[n] = product - 1 # Process each query for q in queries: print(alb[q]) if __name__ == "__main__": main()