Give me idea for the following problem.
The positive divisor function is defined as a function that counts the number of positive divisors of an integer N, including 1 and N. If we define the positive divisor function as D(N), then, for example: D(24) = 8 (Because 24 has 8 divisors and they are 1, 2, 3, 4, 6, 8, 12, 24) Calculating D(N) is a classical problem and there are many efficient algorithms for that. But what if you are asked to find something different? Given a range and an integer K, can you find out for how many N in the given range, D(N) equals K?
Input:
In the very first line, you’ll have an integer called T. This is the number of test cases that shall follow. Every test case contains three integers, L, R, and K. L and R represent the range and are inclusive.
Constraints:
● 1 ≤ T < 31
● 1 ≤ L ≤ R < 2^31
● 1 ≤ K < 2^31
Output:
For every test case, you must print the case number, followed by the count of numbers with exactly K divisors in the range.