Mbpp/65

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度463 字符
模型生成的代码 (463 字符)
def recursive_list_sum(lst):
    """
    Recursively flattens a nested list and sums all its elements.
    
    Args:
        lst: A list that may contain integers or other nested lists.
    
    Returns:
        The sum of all integers within the nested list structure.
    """
    total = 0
    for element in lst:
        if isinstance(element, list):
            total += recursive_list_sum(element)
        else:
            total += element
    return total
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试