Find the power of K in the factorial 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.
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.