Given three integers a, b, n .Your task is to print number of numbers between a and b including them also which have n-divisors. A number is called n-divisor if it has total n divisors including 1 and itself.
Input : a = 1, b = 7, n = 2
Output : 4
There are four numbers with 2 divisors in
range [1, 7]. The numbers are 2, 3, 5, and 7.
First line consists of T test cases. The only line of every test case consists of a, b, and n.
Single line output, print the count of numbers between a and b which have n- divisors.
1<= T <=100
1<= a, b <=100000
1<= n <=16
1 7 2
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.