Mbpp/760

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
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 失败测试用例
  • 无失败测试