diff --git "a/seongwon030/DP/\355\225\251\353\266\204\355\225\264.py" "b/seongwon030/DP/\355\225\251\353\266\204\355\225\264.py" new file mode 100644 index 0000000..13e1241 --- /dev/null +++ "b/seongwon030/DP/\355\225\251\353\266\204\355\225\264.py" @@ -0,0 +1,13 @@ +n,k = map(int,input().split()) + +mod = 1000000000 + +dp = [[0] * (n+1) for _ in range(k+1)] # 2차원 배열 +dp [0][0] = 1 # 초기값 설정 + +for i in range(1,k+1): + for j in range(n+1): + dp[i][j] = dp[i-1][j] + dp[i][j-1] + dp[i][j] = dp[i][j] % mod + +print(dp[k][n]) \ No newline at end of file