0%
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
m , n = map(int,input().split(' '))
d = [[0 for _ in range(n+1)] for _ in range(m+1)] result = 0 for i in range(0,m+1): for j in range(1,n+1): if i==0 or i==1 or j==1: d[i][j] = 1 elif i>=j: d[i][j] = d[i][j-1] + d[i-j][j] else: d[i][j] = d[i][j-1] result = d[i][j] print(result)
|