Cheers,
I know you can get the amount of combinations with the following formula (without repetition and order is not important):
// Choose r from n n! / r!(n - r)!
However, I don't know how to implement this in C++, since for instance with
n = 52 n! = 8,0658175170943878571660636856404e+67
the number gets way too big even for unsigned __int64
(or unsigned long long
). Is there some workaround to implement the formula without any third-party "bigint" -libraries?