Mbpp/3

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度402 字符
模型生成的代码 (402 字符)
def is_not_prime(n: int) -> bool:
    """
    Returns True if n is not a prime number, False otherwise.
    A prime number is a natural number greater than 1 that has no positive divisors
    other than 1 and itself.
    """
    if n < 2:
        return True
    # Check for factors up to sqrt(n)
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return True
    return False
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试