map int input split max for in range append for in range append for in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
a,b = map(int,input().split())
t = max(a,b)
c = []
for i in range(t):
c.append([])
for j in range(t):
c[i].append(1)
for i in range(t):
if i + 1 < t:
for j in range(t):
if j + 1 <t:
c[i+1][j+1] = c[i+1][j]+c[i][j+1]
print(c[a-1][b-1])