测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 463 字符 |
模型生成的代码 (463 字符)
def recursive_list_sum(lst):
"""
Recursively flattens a nested list and sums all its elements.
Args:
lst: A list that may contain integers or other nested lists.
Returns:
The sum of all integers within the nested list structure.
"""
total = 0
for element in lst:
if isinstance(element, list):
total += recursive_list_sum(element)
else:
total += element
return total
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试