Skip to content

Commit 59ee5a7

Browse files
author
hangyeol
committed
108차 2번 문제풀이
1 parent 1b547e9 commit 59ee5a7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
def main():
2+
N, K = map(int, input().split())
3+
dp = [[0] * (N + 1) for _ in range(K + 1)]
4+
5+
for i in range(K + 1):
6+
dp[i][0] = 1
7+
8+
for i in range(1, K + 1):
9+
for j in range(1, N + 1):
10+
dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % 1000000000
11+
12+
print(dp[K][N])
13+
14+
15+
16+
if __name__ == '__main__':
17+
main()

0 commit comments

Comments
 (0)