if the concatenation results in mask of Pandigital Concatenation , calculate all pairs formed with Masks i and j
if ( ( i j ) == pandigitalMask ) { if ( i == j ) ans += ( freq [ i ] * ( freq [ i ] - 1 ) ) ; else ans += ( freq [ i ] * freq [ j ] ) ; } } }