comefrom: <doocs>1891.Cutting Ribbons_1.py
code: def maxLength( ribbons: List[int], k: int) -> int:
      low, high = 0, 100000
      while low < high:
          mid = (low + high + 1) >> 1
          cnt = 0
          for ribbon in ribbons:
              cnt += ribbon // mid
          if cnt < k:
              high = mid - 1
          else:
              low = mid
      return low
masked: def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
      var_5 , var_7 = 0 , 100000
      while var_5 < var_7 :
          var_9 = ( var_5 + var_7 + 1 ) >> 1
          var_10 = 0
          for var_11 in var_0 :
              var_10 += var_11 // var_9
          if var_10 < var_3 :
              var_7 = var_9 - 1
          else :
              var_5 = var_9
      return var_5
  