测试评估
| 指标 | 结果 |
|---|---|
| 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 失败测试用例
- 无失败测试