python 10行递推动态规划解法
走方格的方案数
http://www.nowcoder.com/practice/e2a22f0305eb4f2f9846e7d644dba09b
while True: try: m,n = map(int,input().split()) # m为行数,n为列数 c = [[1 for i in range(n+1)] for j in range(m+1)] # 隐含了边界条件初始化 for i in range(1,m+1): # 转换为求解从右下角走到左上角的路径数 for j in range(1,n+1): c[i][j] = c[i-1][j] + c[i][j-1] print(c[m][n]) except: break