这是寻找的方式数K礼物可从N礼品其中N可以是非常大(N〜10 ^ 18)被选择的一种有效的方式。这就是我们要计算N(C)K或N选择K.ķ也可以是N个数量级。
What is an efficient way of finding the number of ways k gifts can be chosen from N gifts where N can be very large (N ~ 10^18). That is we have to calculate N(C)K or N chose K. K can also be of the order of N.
我想有没有快速的方法来计算这样的大量涌现。您可以使用接近它 Stirling公式
I guess there are no fast ways to compute such large numbers. You can approximate it using Stirling's formula
下一篇:8皇后问题皇后、问题