测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 394 字符 |
模型生成的代码 (394 字符)
def divisor(n: int) -> int:
"""
Return the number of positive divisors of the given integer n (n > 0).
"""
if n <= 0:
raise ValueError("Input must be a positive integer")
count = 0
i = 1
while i * i <= n:
if n % i == 0:
if i * i == n:
count += 1
else:
count += 2
i += 1
return count
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试