测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 369 字符 |
模型生成的代码 (369 字符)
def odd_num_sum(n):
"""
Compute the sum of the fourth power of the first n odd natural numbers.
Args:
n (int): The count of odd numbers to include.
Returns:
int: The sum of 1^4 + 3^4 + ... + (2n-1)^4.
"""
total = 0
for i in range(1, 2 * n, 2): # generates 1, 3, 5, ... up to (2n-1)
total += i ** 4
return total
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试