| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 68104 | 标准课程 | 找路径 | Python3 | Wrong Answer | 29 MS | 3776 KB | 518 | 2024-03-19 15:45:51 |
def countPaths(m, n): dp = [[0]*(n+1) for _ in range(m+1)] dp[0][0] = 1 for i in range(m+1): for j in range(n+1): if i > 0: dp[i][j] += dp[i-1][j] if j > 0: dp[i][j] += dp[i][j-1] if i > 0 and j > 0: dp[i][j] += dp[i-1][j-1] return dp[m][n] # 从标准输入读取m和n m, n = map(int, input().split()) # 计算并打印所有可能的路径数量 print(countPaths(m, n))
------Input------
20 20
------Answer-----
985525432
------Your output-----
260543813797441