Mbpp/57

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度524 字符
模型生成的代码 (524 字符)
def find_Max_Num(digits):
    """
    Return the largest integer that can be formed by concatenating the given list of digits.
    The digits are assumed to be single-digit integers (0-9).
    """
    # Sort the digits in descending order
    sorted_digits = sorted(digits, reverse=True)
    # Concatenate the sorted digits into a string and convert to integer
    result_str = ''.join(map(str, sorted_digits))
    # Handle the edge case of an empty list (though not expected)
    return int(result_str) if result_str else 0
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试