一、leetcode地址
https://leetcode.com/problems/unique-paths/
二、问题描述
三、代码实现
语言:Python3
代码:
class Solution:
def uniquePaths(self, m: int, n: int) -> int:
if m == 1 or n == 1:
return 1
i = 1;a = 1;b = 1
while i < n:
a *= i
b *= (m+i-1)
i += 1
return b//a