comefrom: <doocs>1103.Distribute Candies to People_1.py
code: def distributeCandies( candies: int, num_people: int) -> List[int]:
      ans = [0] * num_people
      i = 0
      while candies > 0:
          ans[i % num_people] += min(candies, i + 1)
          candies -= min(candies, i + 1)
          i += 1
      return ans
masked: def sample_funcname ( var_0 : int , var_2 : int ) -> List [ int ] :
      var_5 = [ 0 ] * var_2
      var_6 = 0
      while var_0 > 0 :
          var_5 [ var_6 % var_2 ] += min ( var_0 , var_6 + 1 )
          var_0 -= min ( var_0 , var_6 + 1 )
          var_6 += 1
      return var_5
  