Mbpp/264

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度333 字符
模型生成的代码 (333 字符)
def dog_age(human_years):
    """
    Calculate a dog's age in dog years given its age in human years.
    
    The first two years count as 10.5 dog years each, 
    and each subsequent year counts as 4 dog years.
    """
    if human_years <= 2:
        return human_years * 10.5
    else:
        return 21 + (human_years - 2) * 4
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试