Kth root.(not able to solve)

Can you please check my code and tell me how to solve it.
link: https://ide.codingblocks.com/s/79790

Hi @shantanu.kaushik21

Look carefully at the input format.
The first line contains the number of test cases, T. Next T lines contains integers, n, and k.