Mbpp/56

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度264 字符
模型生成的代码 (264 字符)
def check(n: int) -> bool:
    """
    Returns True if n is one less than twice its reverse, False otherwise.
    """
    # Reverse the number by converting to string, reversing, and back to int
    reversed_n = int(str(n)[::-1])
    return n == 2 * reversed_n - 1
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试