第26622题 单选题
下列关于Python实现阶乘的aFactorial()和bFactorial()函数的说法,错误的是?

现有如下Python代码,其中aFactorial()bFactorial()均用于求正整数的阶乘:

def aFactorial(N):
    rst = 1
    for i in range(1,N + 1):
        rst *= i
    return rst

def bFactorial(N):
    if N == 1 or N == 0:
        return 1
    return N * bFactorial(N-1)

print(aFactorial(10),bFactorial(10))
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析