Mbpp/608

❌ 均未通过 Base: FAIL Plus: FAIL
测试评估
指标结果
Base 测试FAIL
Plus 测试FAIL
代码长度355 字符
模型生成的代码 (355 字符)
def bell_Number(n: int) -> int:
    """
    Compute the nth Bell number (B0=1, B1=1, B2=2, B3=5, B4=15, ...)
    using the Bell triangle (Peirce triangle / Aitken's array) method.
    """
    if n < 0:
        raise ValueError("n must be non-negative")
    # Initialize the Bell triangle
    bell = [[0] * (n + 1) for _ in range(n + 1)]
    bell[0][0] = 1
Base 失败测试用例
  • [2]
Plus 失败测试用例
  • [10]