text: Maximum possible prime divisors that can exist in numbers having exactly N divisors | Java implementation to find the maximum possible prime divisor of a number can have 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: import java . util . * ; class GFG { static void findMaxPrimeDivisor ( int n ) { int max_possible_prime = 0 ; while ( n % 2 == 0 ) { max_possible_prime ++ ; n = n / 2 ; } for ( int i = 3 ; i * i <= n ; i = i + 2 ) { while ( n % i == 0 ) { max_possible_prime ++ ; n = n / i ; } } if ( n > 2 ) { max_possible_prime ++ ; } System . out . print ( max_possible_prime + "NEW_LINE"); } public static void main ( String [ ] args ) { int n = 4 ; findMaxPrimeDivisor ( n ) ; } }