Akaash was given an assignment by his teacher. He is given a integer N and another integer K. It is told that N is the integeral part of Kth root of some integer.
He needs to find out how many such integers are possible (Refer sample for explaination).
Since he is weak at mathematics, help him do his assignment.
First line of input contains a single integer T denoting the number of test cases.
The only line of each test case contains 2 space-separated integers N and K.
For each test case, print the required answer.
1 <= T <= 500
1 <= N <= 100
2 <= K <= 8
Case 1 :
3 can be the integeral part of square root of following numbers:
9 10 11 12 13 14 15
Case 2 :
2 can be the inetgeral part of cube root of following numbers:
8 9 10 11 ... 26
Case 3 :
2 can be integeral part of square root of following numbers:
4 5 6 7 8
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.