dic = {}
def superSum(k, n):
if k == 0:
return n
find = str(k) + '-' + str(n)
if find in dic:
return dic[find]
sum = 0
for i in range(1, n+1):
sum += superSum(k-1, i)
dic[find] = sum
return dic[find]
while(True):
try:
k, n = input().split(' ')
k = int(k)
n = int(n)
print(superSum(k, n))
except EOFError:
break
알고리즘