[파이썬(Python)] 백준 11050번 - 이항 계수 1
2022. 1. 24. 21:27ㆍLanguage/python
https://www.acmicpc.net/problem/11050
11050번: 이항 계수 1
첫째 줄에 \(N\)과 \(K\)가 주어진다. (1 ≤ \(N\) ≤ 10, 0 ≤ \(K\) ≤ \(N\))
www.acmicpc.net
n, k = map(int, input().split())
def my_facotorial(a):
if (a>1):
return a * my_facotorial(a-1)
else:
return 1
print(int(my_facotorial(n)/(my_facotorial(k) * my_facotorial(n-k))))'Language > python' 카테고리의 다른 글
| [파이썬(Python)] 프로그래머스 - 신규 아이디 추천 (1) | 2022.07.01 |
|---|---|
| [파이썬(Python)] 프로그래머스 - 로또의 최고 순위와 최저 순위 (0) | 2022.07.01 |
| [파이썬(Python)] 백준 11866번 - 요세푸스 문제 0 (0) | 2022.03.07 |
| [파이썬(Python)] 백준 10814번 - 나이순 정렬 (0) | 2022.02.07 |
| [파이썬(Python)] 백준 1018번 - 체스판 다시 칠하기 (0) | 2022.01.24 |