Unique Paths in a Grid
Count the number of unique paths from top-left to bottom-right of a grid, moving only right or down.
Input format
The first line contains M and N (1–15 each, pairs distinct).
Output format
Print the number of paths from top-left to bottom-right (right/down only).
Constraints
- Values fit in a 64-bit signed integer
- Trailing whitespace and a trailing newline are ignored by the judge
Read from stdin, write to stdout. Sample cases below show the exact format.
Sample cases
Example 1
Input
3 2Expected output
3Example 2
Input
3 3Expected output
6