Mbpp/116

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度438 字符
模型生成的代码 (438 字符)
def tuple_to_int(t):
    """
    Convert a tuple of positive integers into a single integer by concatenating their digits.
    
    Parameters:
    t (tuple): Tuple of positive integers.
    
    Returns:
    int: Concatenated integer.
    """
    # Convert each integer to its string representation and join them, then convert back to int.
    # If the tuple is empty, return 0.
    return int(''.join(str(num) for num in t)) if t else 0
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试