[python, math] factorial, comb

한라봉·2023년 4월 10일

Python 문법

목록 보기
14/15

math.factorial

https://docs.python.org/3/library/math.html#math.factorial

math.factorial(n)

n의 팩토리얼(n!n!)을 반환한다.
n은 float형이나 음수가 될 수 없다.

math.comb

https://docs.python.org/3/library/math.html#math.comb

math.comb(n, k)

nCk_{n}C_{k}를 반환한다.

profile
개발자가 되고 싶은 한라봉

0개의 댓글