Logarithm tricks for Competitive Programming | Function to find the Kth root of the number ; Driver Code
function kthRoot ( n , k ) { return Math . pow ( k , ( 1.0 / k ) * ( Math . log ( n ) / Math . log ( k ) ) ) ; } var N = 8.0 ; var K = 3 ; document . write ( kthRoot ( N , K ) ) ;