Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = int(input())
- y = int(input())
- a = [[0] * x for i in range (y - 1)] + [[1] * x]
- for i in range (y - 1):
- a[i][x - 1] = 1
- for i in range(2, y + 1):
- for j in range(2, x + 1):
- a[y - i][x - j] = a[y - i + 1][x - j] + a[y - i][x - j + 1]
- print (a[0][0])
Advertisement
Add Comment
Please, Sign In to add comment