m1ndy5's coding blog

Permutation & Combination 식 본문

알고리즘 with python/알고리즘 스터디

Permutation & Combination 식

정민됴 2023. 3. 16. 23:55

nPr = n! / (n-r)!

ex) 9P3 = 9*8*7

nCr = n! / r! (n-r)!

ex) 9C3 = 9*8*7 / 3*2*1