Skip to content

Commit

Permalink
#17 : 11050_이항 계수 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ziy00n committed May 10, 2023
1 parent 772c060 commit 876aa1b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 이티지윤/11050_이항 계수 1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import sys
input = sys.stdin.readline

n,k = map(int, input().split())

array = [[0 for _ in range(n+1)] for _ in range(n+1)]

for i in range(n+1):
array[i][i] = 1
array[i][0] = 1

for i in range(2,n+1):
for j in range(1,n+1):
if array[i][j] != 1:
array[i][j] = array[i-1][j-1] + array[i-1][j]

print(array[n][k])

0 comments on commit 876aa1b

Please sign in to comment.