Mbpp/736

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度376 字符
模型生成的代码 (376 字符)
def left_insertion(arr, x):
    """
    Return the left insertion point for `x` in sorted `arr`.
    If `x` is already present, the insertion point is before (to the left of) any existing entries.
    """
    lo, hi = 0, len(arr)
    while lo < hi:
        mid = (lo + hi) // 2
        if arr[mid] < x:
            lo = mid + 1
        else:
            hi = mid
    return lo
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试