Counting freq of each element
int t = digit_prod ( i ) ; if ( mpp . ContainsKey ( t ) ) { mpp [ t ] ++ ; } else { mpp [ i ] = 1 ; } } int ans = 1 ; int maxm = 0 ; foreach ( KeyValuePair < int , int > x in mpp ) {