Mbpp/772

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度421 字符
模型生成的代码 (421 字符)
def remove_length(s, k):
    """
    Remove all words of length k from the given string.

    Args:
        s (str): Input string containing words separated by whitespace.
        k (int): Length of the words to be removed.

    Returns:
        str: A new string with all words of length k removed,
             words separated by a single space.
    """
    return ' '.join(word for word in s.split() if len(word) != k)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试