Mbpp/273

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度522 字符
模型生成的代码 (522 字符)
def substract_elements(tup1, tup2):
    """
    Subtract elements of the second tuple from the first tuple element-wise.
    
    Args:
        tup1 (tuple): First tuple of numbers.
        tup2 (tuple): Second tuple of numbers with the same length as tup1.
    
    Returns:
        tuple: A tuple containing the element-wise differences (tup1[i] - tup2[i]).
    """
    if len(tup1) != len(tup2):
        raise ValueError("Both tuples must have the same length.")
    
    return tuple(a - b for a, b in zip(tup1, tup2))
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试