Find the power of K in the factorial of N.
The first line of the test case contains an integer T denoting the number of test cases. Each of the test case contains two space separated integers N and K.
For each of the test case print power of K in the factorial of N.
1 <= T <= 4.2*103
1 <= N <= 105
1 <= K <= 100
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.