测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | FAIL |
| 代码长度 | 311 字符 |
模型生成的代码 (311 字符)
def last_Digit_Factorial(n):
"""
Returns the last digit of n! (factorial of n).
For n >= 5, n! ends with 0 because it contains factors 2 and 5.
"""
if n >= 5:
return 0
# Compute factorial for n < 5
fact = 1
for i in range(2, n + 1):
fact *= i
return fact % 10
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
[2.5]