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_3 : int ) -> int :
      var_0.sort ( )
      var_6 , var_8 = 0 , len ( var_0 )
      for var_10 in range ( var_8 ) :
          var_12 , var_13 = var_10 + 1 , var_8 - 1
          while var_12 < var_13 :
              var_14 = var_0 [ var_10 ] + var_0 [ var_12 ] + var_0 [ var_13 ]
              if var_14 >= var_3 :
                  var_13 -= 1
              else :
                  var_6 += var_13 - var_12
                  var_12 += 1
      return var_6
  