Mbpp/611

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度405 字符
模型生成的代码 (405 字符)
def max_of_nth(matrix, n):
    """
    Returns the maximum value in the n-th column of the given matrix.

    Parameters:
    matrix (list of lists): A 2D list representing the matrix.
    n (int): The index of the column (0-based).

    Returns:
    The maximum value in column n.
    """
    # Use a generator expression to extract the n-th element from each row
    return max(row[n] for row in matrix)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试