Skip to content
This repository has been archived by the owner on Nov 26, 2019. It is now read-only.

Latest commit

 

History

History

binomialCoefficient

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Binomial Coefficient

A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1 + X)^n A binomial coefficient C(n, k) also gives the number of ways, disregarding order, that k objects can be chosen from among n objects; more formally, the number of k-element subsets (or k-combinations) of an n-element set.

Input Format

First line contains n and k.Where n is the number of objects and k is the number of objects selected.

Output Format

Number of ways of selecting k objects from the set of n objects.

Sample Input

10 3

Sample Output

120

Implemented in: