测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | FAIL |
| 代码长度 | 360 字符 |
模型生成的代码 (360 字符)
def square_Sum(n):
"""
Returns the sum of squares of the first n even natural numbers.
The even natural numbers are 2, 4, 6, ..., 2n.
The sum of their squares is Σ (2i)^2 for i = 1 to n
= 4 * Σ i^2 = 4 * n(n+1)(2n+1)/6.
"""
# Using integer arithmetic to avoid floating-point issues
return 4 * n * (n + 1) * (2 * n + 1) // 6
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
[1000000]