-->
当前位置:首页 > 题库

PROGRAMMING:Find the combination number

Luz5年前 (2021-05-10)题库451
According to the formula, $$C ^ {m}_{ n} = \frac{n!}{ m!( n-m)!}$$ Calculate the number of combinations of $$M $$elements ($$m / Le n $) taken from $$n $$different elements.
It is recommended to define and call the function ` fact (n) ` calculate ` n! ', The type of 'n' is' Int ', and the function type is' double'.
###Input format:
The input gives two positive integers, $$M $$and $$n $$($$m / Le n $$) in one line, separated by spaces.
###Output format:
Output according to the format "result = combination number calculation result". The title ensures that the result is within the scope of the 'double' type.
###Input example:
```in
2 7
```
###Output example:
```out
result = 21
```






answer:If there is no answer, please comment