测试评估
| 指标 | 结果 |
|---|---|
| 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]