Mbpp/471

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度354 字符
模型生成的代码 (354 字符)
def find_remainder(arr, n):
    """
    Returns the product of all elements in the array modulo n.
    
    Parameters:
    arr (list of int): List of integers.
    n (int): The modulus.
    
    Returns:
    int: The product of the array elements modulo n.
    """
    result = 1
    for num in arr:
        result = (result * num) % n
    return result
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试