Python ncr n Выберите функцию R
# Basic syntax:
from math import comb
comb(n, r) # calculates "n choose r" aka nCr aka binomial coefficients
Charles-Alexandre Roy
# Basic syntax:
from math import comb
comb(n, r) # calculates "n choose r" aka nCr aka binomial coefficients