Mbpp/579

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度579 字符
模型生成的代码 (579 字符)
def find_dissimilar(tup1, tup2):
    """
    Return a tuple of elements that appear in exactly one of the two input tuples.
    The order is: first the elements unique to tup1 (in their original order),
    followed by the elements unique to tup2 (in their original order).
    """
    set2 = set(tup2)
    set1 = set(tup1)
    # Elements in tup1 not in tup2, preserving order
    unique_tup1 = [x for x in tup1 if x not in set2]
    # Elements in tup2 not in tup1, preserving order
    unique_tup2 = [x for x in tup2 if x not in set1]
    return tuple(unique_tup1 + unique_tup2)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试