Mbpp/593

⚠️ Base 通过 / Plus 失败 Base: PASS Plus: FAIL
测试评估
指标结果
Base 测试PASS
Plus 测试FAIL
代码长度418 字符
模型生成的代码 (418 字符)
def removezero_ip(ip: str) -> str:
    """
    Remove leading zeroes from each octet of an IPv4 address.
    
    Args:
        ip (str): IPv4 address as a string, may contain leading zeroes in octets.
        
    Returns:
        str: IPv4 address with leading zeroes removed from each octet.
    """
    parts = ip.split('.')
    cleaned_parts = [str(int(part)) for part in parts]
    return '.'.join(cleaned_parts)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • ['0.0.0.0']