测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 571 字符 |
模型生成的代码 (571 字符)
def count_samepair(list1, list2, list3):
"""
Count the number of items that are identical in the same position across three given lists.
Args:
list1 (list): First list.
list2 (list): Second list.
list3 (list): Third list.
Returns:
int: The count of positions where all three lists have the same value.
"""
# Use zip to iterate over elements from all three lists simultaneously
# and count the positions where all three values are equal.
return sum(1 for a, b, c in zip(list1, list2, list3) if a == b == c)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试