Finding the count of pair from the given numbers .
if ( m1 == m2 ) : NEW_LINE INDENT ans += ( cnt [ m1 ] * ( cnt [ m1 ] - 1 ) ) NEW_LINE DEDENT else : NEW_LINE INDENT ans += ( cnt [ m1 ] * cnt [ m2 ] ) NEW_LINE DEDENT return ans // 2 NEW_LINE