题解 | #走方格的方案数#
走方格的方案数
https://www.nowcoder.com/practice/e2a22f0305eb4f2f9846e7d644dba09b
l=input().split() n,m=int(l[0]),int(l[1]) dp=[[1 for _ in range(n+1)] for _ in range(m+1)] for i in range(1,m+1): for j in range(1,n+1): dp[i][j]=dp[i][j-1]+dp[i-1][j] print(dp[-1][-1])