Problem of the day
N'th root of an integer M is a number, which, when raised to the power N, gives M as a result.
The first line of the input consists of two space-separated integers, N and M.
Return an integer that denotes the Nth root of M in a separate line.
You don't have to print anything. It has already been taken care of. Just Implement the given function.
1 <= N <= 30
1 <= M <= 10^9
Time Limit: 1 sec.
3 27
3
3rd Root of 27 is 3, as (3)^3 equals 27.
4 69
-1
4th Root of 69 is not an integer, hence -1.