Count Divisors
EasyMath
Description
Given a positive integer n, return the count of its positive divisors (including 1 and n itself).
Examples
Input:
n = 12Output:
6Explanation:
Divisors: 1,2,3,4,6,12.
Input:
n = 1Output:
1Explanation:
Only 1 divides 1.
Input:
n = 36Output:
9Explanation:
36 = 2^2 * 3^2, so (2+1)(2+1) = 9 divisors.
Constraints
- •
1 ≤ n ≤ 10⁹