Count the number of positive integers that divide n evenly (including 1 and n).
Input format
One line: a positive integer n.
Output format
One line: the number of divisors of n.
Constraints
- 1 <= n <= 1000000000000
Count the number of positive integers that divide n evenly (including 1 and n).
One line: a positive integer n.
One line: the number of divisors of n.
Example 1
Input
12
Expected
6
Explanation
Divisors 1,2,3,4,6,12 -> 6 divisors.
Example 2
Input
7
Expected
2
Explanation
A prime has exactly 2 divisors.
Ready to solve this?
Sign in to open the editor, run your code against the sample tests, and submit against the full test suite.
Sign in to solve →