Mbpp/285

⚠️ Plus 仅通过 Base: FAIL Plus: PASS
测试评估
指标结果
Base 测试FAIL
Plus 测试PASS
代码长度546 字符
模型生成的代码 (546 字符)
import re
def text_match_two_three(s: str) -> bool:
    """
    Checks whether the string contains the 'a' character followed by 
    exactly two or three 'b' characters.
    
    Args:
        s (str): Input string.
    
    Returns:
        bool: True if pattern 'abb' or 'abbb' is found anywhere in the string,
              False otherwise.
    """
    # Pattern: 'a' followed by exactly two or three 'b's.
    # The negative lookahead ensures no extra 'b' after three.
    pattern = r'a(?:bb|bbb)(?!b)'
    return bool(re.search(pattern, s))
Base 失败测试用例
  • ['abbbba']
Plus 失败测试用例
  • 无失败测试