Mbpp/470

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度317 字符
模型生成的代码 (317 字符)
def add_pairwise(tup):
    """
    Write a function to find the pairwise addition of the neighboring elements of the given tuple.
    assert add_pairwise((1, 5, 7, 8, 10)) == (6, 12, 15, 18)
    """
    # Collect pairwise sums of neighboring elements
    return tuple(tup[i] + tup[i + 1] for i in range(len(tup) - 1))
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试