memo=[[0] * 15 for _ in range(15)]
def SuperSum(k,n):
result = 0
if k == 0:
return n
if memo[k][n] != 0:
return memo[k][n]
for i in range(1,n+1):
result += (SuperSum(k-1,i))
memo[k][n] = result
return memo[k][n]
while True:
try:
k,n=map(int,input().split())
print(SuperSum(k,n))
except EOFError:
break
To embed this project on your website, copy the following code and paste it into your website's HTML: