Mbpp/290

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度525 字符
模型生成的代码 (525 字符)
def max_length(list_of_lists):
    """
    Finds the list with the maximum length in a list of lists.
    Returns a tuple (max_len, list_with_max_len).
    If multiple lists have the same maximum length, the first one encountered is returned.
    """
    if not list_of_lists:
        return (0, [])  # handle empty input
    
    max_len = -1
    longest_list = None
    for lst in list_of_lists:
        if len(lst) > max_len:
            max_len = len(lst)
            longest_list = lst
    return (max_len, longest_list)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试