text: Maximum possible prime divisors that can exist in numbers having exactly N divisors | Function to find the maximum possible prime divisors of a number can have with N divisors ; Number of time number divided by 2 ; Divide by other prime numbers ; If the last number of also prime then also include it ; Driver Code ; Function Call
code: function findMaxPrimeDivisor ( n ) { let max_possible_prime = 0 ; while ( n % 2 == 0 ) { max_possible_prime ++ ; n = Math . floor ( n / 2 ) ; } for ( let i = 3 ; i * i <= n ; i = i + 2 ) { while ( n % i == 0 ) { max_possible_prime ++ ; n = Math . floor ( n / i ) ; } } if ( n > 2 ) { max_possible_prime ++ ; } document . write ( max_possible_prime + " " ) ; } let n = 4 ; findMaxPrimeDivisor ( n ) ;