#C8685. Ordered Divisor Pairs Counting
Ordered Divisor Pairs Counting
Ordered Divisor Pairs Counting
You are given a positive integer N. Your task is to compute the number of ordered pairs (a, b) such that the product a × b = N. In other words, you need to count all pairs of positive integers (a, b) satisfying
Note that a pair (a, b) is considered different from (b, a) unless a = b.
The input consists of several test cases. For each test case, you are given the integer N and you need to output the corresponding count. For example:
- If N = 6, the ordered pairs are (1, 6), (6, 1), (2, 3), (3, 2) and the answer is 4.
- If N = 16, the ordered pairs are (1, 16), (16, 1), (2, 8), (8, 2), (4, 4) and the answer is 5.
Solve the problem by processing multiple test cases from the standard input and printing the results to the standard output.
inputFormat
The input is read from stdin and has the following format:
T N1 N2 ... NT
Here, the first line contains an integer T (the number of test cases), and each of the next T lines contains a single positive integer N.
outputFormat
For each test case, output the corresponding count of ordered pairs satisfying a × b = N on a separate line, written to stdout.
## sample3
6
20
1
4
6
1
</p>