Mbpp/589

⚠️ Base 通过 / Plus 失败 Base: PASS Plus: FAIL
测试评估
指标结果
Base 测试PASS
Plus 测试FAIL
代码长度533 字符
模型生成的代码 (533 字符)
import math
def perfect_squares(low, high):
    """
    Find all perfect squares between low and high (inclusive).
    
    Args:
        low (int): lower bound
        high (int): upper bound
    
    Returns:
        list: sorted list of perfect squares in [low, high]
    """
    # Find the smallest integer whose square is >= low
    start = math.isqrt(low)
    if start * start < low:
        start += 1
    
    squares = []
    i = start
    while i * i <= high:
        squares.append(i * i)
        i += 1
    return squares
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • [-10, -1]