Mbpp/265

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度395 字符
模型生成的代码 (395 字符)
def list_split(lst, n):
    """
    Splits a list into n sublists by taking every nth element.
    
    Args:
        lst (list): The input list.
        n (int): The step size for grouping.
    
    Returns:
        list: A list of n sublists, where sublist i contains elements 
              at indices i, i+n, i+2n, ... from the original list.
    """
    return [lst[i::n] for i in range(n)]
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试