#K69422. Counting Rectangular Planting Arrangements
Counting Rectangular Planting Arrangements
Counting Rectangular Planting Arrangements
You are given a positive integer n that represents the number of trees. Your task is to determine the number of ways to plant these n trees in a rectangular grid such that the grid dimensions multiply to n.
This problem is equivalent to counting the number of positive divisors of n. In mathematical terms, if the prime factorization of n is given by $$n = p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k},$$ then the number of ways to arrange the trees is $$d(n)=\prod_{i=1}^{k}(a_i+1).$$
Note that even if the grid is not square, each distinct pair of factors represents a valid rectangular arrangement. Your program should read the integer from standard input and output the number of divisors of n.
inputFormat
The input consists of a single integer n (1 ≤ n ≤ 106), representing the number of trees.
outputFormat
Output a single integer which is the number of ways to plant the n trees, i.e. the number of divisors of n.
## sample1
1
</p>