题库 Python题库 题目列表 若要求出把a个元素分成b个子集,有多少种可能性,例:...
单选题

若要求出把a个元素分成b个子集,有多少种可能性,例:function(4,2)返回值为7,则返回值中函数的参数分别为?( )

def function(a,b):
    if (b == 1 or b == a):
        return 1
    else:
        return function(   )+b*function(a-1,b)
A.

(a-1,b-1)

B.

(a+1,b-1)

C.

(a-1,b+1)

D.

(a+1,b+1)

题目信息
2021年 12月 选择题
50%
正确率
0
评论
47
点击