fork download
  1. # your code goes here
  2.  
  3. c = [4,5,6,1,2,1,1,1]
  4.  
  5. map = {}
  6.  
  7. for i in c:
  8. if i not in map:
  9. map[i]=1
  10. else:
  11. map[i]+=1
  12.  
  13. m = -1
  14.  
  15. for i in map:
  16. m = max(map[i], m)
  17.  
  18. print(len(c) - m)
Success #stdin #stdout 0.07s 14084KB
stdin
Standard input is empty
stdout
4