测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | FAIL |
| 代码长度 | 298 字符 |
模型生成的代码 (298 字符)
def sum(a, b):
"""
Returns the sum of all common divisors of two given numbers.
"""
total = 0
# Common divisors cannot exceed the smaller number
limit = min(a, b)
for i in range(1, limit + 1):
if a % i == 0 and b % i == 0:
total += i
return total
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
[987654321, 123456789]