题解 | #放苹果#
放苹果
http://www.nowcoder.com/practice/bfd8234bb5e84be0b493656e390bdebf
# -*-coding:utf-8-*-
def apdisk(m , n):
if m < 0 or n < 0:
return 0
elif m == 1 or n == 1:
return 1
else:
return apdisk(m , n - 1) + apdisk(m - n , n)
while True:
try:
input_m , input_n = map(int , input().split(" "))
print(apdisk(input_m , input_n))
except:
break