Mbpp/592

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度358 字符
模型生成的代码 (358 字符)
import math
def sum_Of_product(n: int) -> int:
    """
    Returns the sum of the product of consecutive binomial coefficients.
    For a given integer n, it computes sum_{k=0}^{n-1} C(n, k) * C(n, k+1),
    which is known to equal C(2n, n-1).
    """
    if n < 1:
        raise ValueError("n must be a positive integer.")
    return math.comb(2 * n, n - 1)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试