分苹果
放苹果
http://www.nowcoder.com/questionTerminal/bfd8234bb5e84be0b493656e390bdebf
注意输入格式为 2 4
def f(m,n):
if n==1 or m==1 or m==0:
return 1
elif m<0 or n<=0:
return 0
else:
return f(m-n,n)+f(m,n-1)
if name=='main':
while True:
try:
s= raw_input()
s1= s.split(' ')
# print m
m = int(s1[0])
n = int(s1[1])
print f(m,n)
except:
break