a guest Aug 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n, m = map(int, input().split())
  2. a = [[1] * n for i in range(m)]
  3. for i in range(1, m):
  4.     for j in range(1, n):
  5.         a[i][j] = a[i-1][j] + a[i][j-1]
  6. print(a[-1][-1])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand