测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 432 字符 |
模型生成的代码 (432 字符)
def is_num_decagonal(n):
"""
Compute the nth decagonal number.
A decagonal number is a figurate number that represents a decagon.
The nth decagonal number is given by the formula: n * (4*n - 3).
Parameters:
n (int): The position in the sequence (1-indexed).
Returns:
int: The nth decagonal number.
Example:
>>> is_num_decagonal(3)
27
"""
return n * (4 * n - 3)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试