The first line contains a single integer ‘T’ representing the number of test cases.
Then the test cases follow.
The first line of each test case contains 2 space-separated integers ‘a’ and 'b' (defining the value of ‘N’)
For each test case print the maximum integer score achieved.
Print the output of each test case in a new line.
You don’t need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= a <= 10^5
1 <= b <= 10^5
Time Limit : 1 sec
We can notice that N is nothing but ( b+1 )*( b+2 )*...*( a )
And we need to calculate the total prime factors of N.
So, we can just calculate the total prime factors of each of ( b+1 ) , ( b+2 ) , … , ( a ), and take the total of these as powers are additive in nature.
Algorithm :
Pair Product Div by K
Pair Product Div by K
Merge Two Sorted Arrays Without Extra Space
Merge Two Sorted Arrays Without Extra Space
Co-Prime
First Digit One
Special Digit Numbers