测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 319 字符 |
模型生成的代码 (319 字符)
def rotate_right(lst, k):
"""
Rotate the given list to the right by k positions.
Returns a new list with the elements rotated.
"""
if not lst:
return lst
n = len(lst)
k = k % n
# Slicing: last k elements moved to the front, rest after
return lst[-k:] + lst[:-k] if k else lst
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试