0 out of 464 challenges solved

Count Divisors of Integer

Write a Python function `count_divisors(n: int) -> int` that calculates the number of divisors of a given positive integer `n`.

A divisor of a number is an integer that divides the number without leaving a remainder. For example, the divisors of `12` are `1, 2, 3, 4, 6, 12`.

#### Example Usage
```python [main.nopy]
print(count_divisors(15))  # Output: 4 (divisors are 1, 3, 5, 15)
print(count_divisors(12))  # Output: 6 (divisors are 1, 2, 3, 4, 6, 12)
print(count_divisors(9))   # Output: 3 (divisors are 1, 3, 9)
```

#### Constraints
- The input `n` will be a positive integer greater than 0.
def count_divisors(n: int) -> int:
    """
    Calculate the number of divisors of a given positive integer n.

    Args:
    n (int): The integer to find divisors for.

    Returns:
    int: The number of divisors of n.
    """
    # Placeholder for the solution
    pass