• + 2 comments

    Count the element with maximum frequency and all other elements must be removed apart from that. from collections import Counter n=int(raw_input())

    array=Counter(map(int,raw_input().split())) a=[] a=Counter(array).values() print(n-max(a))