题解 | #小乐乐走台阶#
牛牛的排列数
http://www.nowcoder.com/practice/9ca1c236cdbf46da9e08e1f510808625
def mmm(n,m):
if m==0:
return 1
if m>0:
return (n-m+1)*mmm(n,m-1)
n,m=[int(x) for x in input().split()]
print(mmm(n,m))
牛牛的排列数
http://www.nowcoder.com/practice/9ca1c236cdbf46da9e08e1f510808625
def mmm(n,m):
if m==0:
return 1
if m>0:
return (n-m+1)*mmm(n,m-1)
n,m=[int(x) for x in input().split()]
print(mmm(n,m))
相关推荐