K-Th Root

You will be given Q queries. In each query, you will be given two positive integers A and B. You hav...