title: Removing N Elements
body: <p>How to write a code that returns a list with all elements that occurred N times removed?</p>
  
  <p>I'm trying to write a python function duplicate(elem, N) which returns a copy of the input list with all elements that appeared at least N times removed. The list can't be sorted. For example ((2, 2, 2, 1, 2, 3, 4, 4, 5), 2) would return (1,3,5). </p>