Run ID:68102
提交时间:2024-03-19 15:05:45
def countPaths(m, n): dp = [[1]*n for _ in range(m)] for i in range(1, m): for j in range(1, n): dp[i][j] = dp[i-1][j] + dp[i][j-1] + dp[i-1][j-1] return dp[-1][-1] # 从标准输入读取m和n m, n = map(int, input().split()) # 计算并打印所有可能的路径数量 print(countPaths(m, n))