class Solution:

    def minIncrementForUnique(self, A):
        increments = 0
        last_used = -1
        for num in sorted(A):
            if num <= last_used:
                increments += last_used + 1 - num
                last_used += 1
            else:
                last_used = num
        return increments

8cd80a2637a4fdbd889e4b3ac1382457fec3c8b9
<mask token>

class Solution:
    <mask token>

class Solution:

    def minIncrementForUnique(self, A):
        increments = 0
        last_used = -1
        for num in sorted(A):
            if num <= last_used:
                increments += last_used + 1 - num
                last_used += 1
            else:
                last_used = num
        return increments
