Take answer as total unique numbers and remove the frequency and subtract the answer
ans = len ( count ) NEW_LINE for i in range ( 1 , n + 1 ) : NEW_LINE INDENT temp = fre_arr [ i ] NEW_LINE if ( temp == 0 ) : NEW_LINE INDENT continue NEW_LINE DEDENT DEDENT