Skip to content

C from n to k

admin edited this page Jun 10, 2021 · 3 revisions

Welcome to Mathematical experiments the math wiki!

Агентство цифровых технологий

Let there be n different objects. To find the number of combinations of n objects by k, we will choose combinations of m objects in all possible ways, while paying attention to the different composition of the combinations, but not the order (it is not important here, unlike the placements).

Intro

Go License Website dta.agency GitHub release

import "github.com/digital-technology-agency/math"

func Example() {
    n := 100
    k := 3
    value := math.CnkUint(n, k)
	fmt.Printf("Result: %d", value)
    /*
        Result: 161700    
    */ 
}
Clone this wiki locally