Stores the frequencies of prime divisors
Dictionary < int , int > prime = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( prime . ContainsKey ( p [ i ] ) ) prime [ p [ i ] ] = prime [ p [ i ] ] + 1 ; else prime . Add ( p [ i ] , 1 ) ; } int product = 1 , d = 1 ;