You are required to implement a Python function that counts how many integers within a specified range have exactly N divisors.
Functionality
The function count_n_divisors takes three integer parameters:
A (the starting point of the range, inclusive)
B (the endpoint of the range, inclusive)
N (the exact number of divisors an integer must have to be counted)
The function should iterate through all integers from A to B (both inclusive) and for each integer, calculate the number of divisors it has. If an integer has exactly N divisors, it should be counted towards the final result.
Input Requirements
The function will accept:
A: An integer (1 ≤ A ≤ 10^6)
B: An integer (A ≤ B ≤ 10^6)
N: An integer (0 ≤ N ≤ 100)
Output Requirements
The function should return an integer representing the count of numbers within the range [A, B] that have exactly N divisors.
Implementation
You need to implement the function according to the description above and ensure it adheres to the provided signature.
The solution must be written in a file called /app/solution.py.