Fill up to duplicate ranges

Perl 6, 37 33 bytes

-4 bytes thanks to nwellnhof!

{^.keys.max+1 xx.values.max∖$_}

Try it online!

Anonymous code block that takes a Bag and returns a Bag of values.

Explanation:

{                             } # Anonymous code block
 ^.keys.max+1  # Create a range from 1 to the maximum value of the list
              xx  # Multiply the list by:
                .values.max      # The amount of the most common element
                           ∖$_   # Subtract the original Bag

R, 59 49 48 bytes

rep(s<-1:max(L<-scan()),max(y<-table(c(L,s)))-y)

Try it online!


Python 2, 86 83 80 72 bytes

def f(l):m=range(1,max(l)+1)*max(map(l.count,l));map(m.remove,l);print m

Try it online!