lib.number_theory package

Submodules

lib.number_theory.combination module

組合せの前計算

class lib.number_theory.combination.Comb(max_size: int)

ベースクラス: object

comb(n: int, r: int) int

n個のものからr個を選ぶ組合せの数を計算する

comb_rep(n: int, r: int) int

n個のものからr個を重複を許して選ぶ組合せの数を計算する

fact(n: int) int

n個のものの順列の数を計算する

inv(n: int) int

nの逆元を計算する

perm(n: int, r: int) int

n個のものからr個を選ぶ順列の数を計算する

Module contents