K-Th Root

You will be given Q queries. In each query, you will be given two positive integers A and B. You have to find such positive integer K that there exist a positive integer N and NK = AB. If there exists multiple possible values for K, take the maximum of them.


This is a companion discussion topic for the original entry at https://toph.co/p/k-th-root

What’s the answer for this test?
9 6

please update the problem statement. there should be n^k = a^b @hjr265

1 Like

Thanks again, @rkb_rd. The problem statement has been updated.

1 Like