traverse all prime factors and multiply its 1 / N power to the result
console . log ( prime_factors ) for ( let v of prime_factors ) { console . log ( v ) ans *= Math . pow ( v [ 0 ] , Math . floor ( v [ 1 ] / N ) ) ; } return ans ; }