Mbpp/611

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度410 字符
模型生成的代码 (410 字符)
def max_of_nth(matrix, n):
    """
    Returns the maximum value of the n-th column of the given matrix.
    
    Parameters:
    matrix (list of lists): The input matrix.
    n (int): The column index (0-based).
    
    Returns:
    The maximum element in the n-th column.
    """
    # Use a generator expression to iterate over each row and extract the n-th element
    return max(row[n] for row in matrix)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试