list question... unique values in all possible unique spots
Mensanator
mensanator at aol.com
Tue Aug 12 00:25:55 EDT 2008
On Aug 11, 7:34 pm, bearophileH... at lycos.com wrote:
> Mensanator:
>
> > Ever tried to iterate 403 septillion times?
>
> The OP is talking about formulas, like:
> X + Y * Z = W
> Where X, Y, Z, W distinct and in [1, 26], so you have C(26, 4)
> combinations that's way less than 26!
>
> >>> binomial(26, 4)
>
> 14950
>
> So this can be solved with a xcombinations() generator.
How did you surmise it's C(26,4)?
>
> Bye,
> bearophile
More information about the Python-list
mailing list