DevYoon
[ํ๋ก๊ทธ๋๋จธ์ค] ๋ฑ๊ตฃ๊ธธ (Python) ๋ณธ๋ฌธ
link ๐ https://programmers.co.kr/learn/courses/30/lessons/42898
def solution(m, n, puddles):
board = [[0]*(m+1) for _ in range(n+1)]
puddles = [[j, i] for [i, j] in puddles]
board[1][1] = 1
for y in range(1, n+1):
for x in range(1, m+1):
if y == 1 and x == 1:continue
if [y, x] in puddles:
board[y][x] = 0
else:
board[y][x] = (board[y-1][x]+board[y][x-1])%1000000007
return board[n][m]