Python3 代码
def dfs (x, y):
global a
if x == n and y == m:
a += 1
else:
if x < n:
dfs (x + 1, y)
if y < m:
dfs (x, y + 1)
global n, m
a = 0
n, m = map(int, input().split())
a = 0
dfs (0, 0)
print (a)