comefrom: <doocs>0259.3Sum Smaller_1.py
code: def threeSumSmaller( nums: List[int], target: int) -> int:
      nums.sort()
      ans, n = 0, len(nums)
      for i in range(n):
          j, k = i + 1, n - 1
          while j < k:
              s = nums[i] + nums[j] + nums[k]
              if s >= target:
                  k -= 1
              else:
                  ans += k - j
                  j += 1
      return ans
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : int ) -> int :
      var_0.sort ( )
      var_2 , var_3 = 0 , len ( var_0 )
      for var_4 in range ( var_3 ) :
          var_5 , var_6 = var_4 + 1 , var_3 - 1
          while var_5 < var_6 :
              var_7 = var_0 [ var_4 ] + var_0 [ var_5 ] + var_0 [ var_6 ]
              if var_7 >= var_1 :
                  var_6 -= 1
              else :
                  var_2 += var_6 - var_5
                  var_5 += 1
      return var_2
  