## Solution
- 小学奥数题。
- 让 $G[i][j]$ 表示到坐标 $[i][j]$ 所有可能的方式。$G[0][0] = 0$,同时,我们知道对于所有的 $i = 0$,都有 $G[0][j] = 0$;对于 $j=0$ 也是一样的。
- 对于每一个点 $G[i+1][j+1]$,到它的可能性其实只有两个:$G[i+1][j]$ 或者是 $G[i][j+1]$。所以就是这俩玩意儿的可能性的和。
## Problem
There is a robot on an $m \times n$ grid. The robot is initially located at the top-left corner (i.e., $\texttt{grid}[0][0]$). The robot tries to move to the bottom-right corner (i.e., $\texttt{grid}[m - 1][n - 1]$). The robot can only move either down or right at any point in time.
Given the two integers $m$ and $n$, return the number of possible unique paths that the robot can take to reach the bottom-right corner.
The test cases are generated so that the answer will be less than or equal to $2 \times 10^9$.
### Example 1
**Input:** $m = 3$, $n = 7$
**Output:** $28$
![[Pasted image 20241107225224.png]]
### Example 2
**Input:** $m = 3$, $n = 2$
**Output:** $3$
**Explanation:** From the top-left corner, there are a total of $3$ ways to reach the bottom-right corner:
1. Right $\rightarrow$ Down $\rightarrow$ Down
2. Down $\rightarrow$ Down $\rightarrow$ Right
3. Down $\rightarrow$ Right $\rightarrow$ Down