comefrom: <doocs>0945.Minimum Increment to Make Array Unique_1.py
code: def minIncrementForUnique( nums: List[int]) -> int:
      nums.sort()
      ans = 0
      for i in range(1, len(nums)):
          if nums[i] <= nums[i - 1]:
              d = nums[i - 1] - nums[i] + 1
              nums[i] += d
              ans += d
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_0.sort ( )
      var_5 = 0
      for var_9 in range ( 1 , len ( var_0 ) ) :
          if var_0 [ var_9 ] <= var_0 [ var_9 - 1 ] :
              var_10 = var_0 [ var_9 - 1 ] - var_0 [ var_9 ] + 1
              var_0 [ var_9 ] += var_10
              var_5 += var_10
      return var_5
  