classSolution: defuniquePaths(self, m: int, n: int) -> int: # m行n列的矩阵 lst=[[0for i inrange(n)] for j inrange(m)] for i inrange(m): lst[i][0] = 1 for i inrange(n): lst[0][i] = 1
for i inrange(1,m): for j inrange(1,n): lst[i][j] = lst[i-1][j] + lst[i][j-1]