Skip to content

Commit

Permalink
solve : 2775 부녀회장이 될테야
Browse files Browse the repository at this point in the history
  • Loading branch information
wwan13 committed May 20, 2024
1 parent 29ad337 commit dae4415
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions python/boj_2775.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import sys

input = sys.stdin.readline


def solution(k, n):
people = [i for i in range(1, n+1)]

for i in range(k):
for j in range(1, n):
people[j] += people[j-1]

return people[-1]


def display_result(answer):
print(answer)


def main():
t = int(input())
for _ in range(t):
k = int(input())
n = int(input())
answer = solution(k, n)
display_result(answer)


main()

0 comments on commit dae4415

Please sign in to comment.