测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 377 字符 |
模型生成的代码 (377 字符)
def unique_Element(arr):
"""
Check whether a list of numbers contains only one distinct element.
Args:
arr (list): A list of numbers.
Returns:
bool: True if the list contains exactly one distinct element, False otherwise.
Returns False for an empty list.
"""
if not arr:
return False
return len(set(arr)) == 1
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试