Count Divisors
Return how many positive integers divide n evenly, counting both 1 and n itself.
Example 1
n 12
returns 6
1, 2, 3, 4, 6, 12.
Example 2
n 13
returns 2
1 and 13.
Constraints
1 <= n <= 10**4
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More Math problems
- Decimal to Binary StringBeginner
- Digit Sum in Base KBeginner
- Digital RootBeginner
- Excel Sheet Column NumberBeginner
- Handshake CountBeginner
- Harshad NumberBeginner
- Hex String to DecimalBeginner
- Highest Power of TwoBeginner