cheetcode

111. Unique PathsMedium

Count how many paths move from the top-left to bottom-right of a grid.

A robot starts at the top-left corner of an m x n grid and may move only down or right.

Return the number of distinct paths to reach the bottom-right corner.

Examples

Input: m = 3, n = 7
Output: 28
Input: m = 3, n = 2
Output: 3

Constraints

  • 1 <= m, n <= 100