본문 바로가기

코테 공부/python

Python math.factorial(n) math.comb(n, r)

import math

#factorial 함수 (n!)
math.factorial(n)

#combination 조합 함수 nCr
math.comb(n, r)

'코테 공부 > python' 카테고리의 다른 글

Python 이중 배열 append  (0) 2023.05.30
Python 점의 위치 구하기  (0) 2023.05.30
Python map  (0) 2023.05.30
Python sorted(iterable데이터), 리스트.sort()  (0) 2023.05.29
Python 유니코드 관련 ord('a') #97, chr(97) #a  (0) 2023.05.29