Minimize the value of N by applying the given operations | function to return the product of distinct prime factors of a number ; find distinct prime ; Driver code
function minimum ( n ) { let product = 1 ; for ( let i = 2 ; i * i <= n ; i ++ ) { if ( n % i == 0 ) { while ( n % i == 0 ) n = n / i ; product = product * i ; } } if ( n >= 2 ) product = product * n ; return product ; } let n = 20 ; document . write ( minimum ( n ) ) ;