Thank you for all your responses. I've tried the permutations road
(thank you to all those of you who have suggested it) and it takes %*&
%^ long :-) As expected. I've solved it a different way, which runs
through the 26 spots by just adding one at a time if available. Still
takes a long time, but
On Aug 11, 7:34 pm, [EMAIL PROTECTED] 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)
>
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.
On Aug 11, 3:53 pm, Tobiah <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Aug 2008 13:46:10 -0700, Tobiah wrote:
> > On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote:
>
> >> 40329146112660563558400
>
> > I think it's only 4 septillion.
>
> I meant to say 403.
Whatever.
Ever tried to iterate 403
On Mon, 11 Aug 2008 13:46:10 -0700, Tobiah wrote:
> On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote:
>
>> 40329146112660563558400
>
> I think it's only 4 septillion.
I meant to say 403.
** Posted from http://www.teranews.com **
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 11 Aug 2008 13:46:10 -0700, Tobiah wrote:
> On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote:
>
>> 40329146112660563558400
>
> I think it's only 4 septillion.
I meant 403.
** Posted from http://www.teranews.com **
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote:
> 40329146112660563558400
I think it's only 4 septillion.
Perfectly manageable.
** Posted from http://www.teranews.com **
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 9, 8:05�am, ToshiBoy <[EMAIL PROTECTED]> wrote:
> I'm wondering how to do this the most elegant way: I found this quiz
> in some magazine. I've already solved it on paper, but want to write a
> python program to solve it. It comes down to being able to represent
> range(1,27) through a numbe
On Aug 9, 9:05 am, ToshiBoy <[EMAIL PROTECTED]> wrote:
> I'm wondering how to do this the most elegant way: I found this quiz
> in some magazine. I've already solved it on paper, but want to write a
> python program to solve it. It comes down to being able to represent
> range(1,27) through a numb
I'm wondering how to do this the most elegant way: I found this quiz
in some magazine. I've already solved it on paper, but want to write a
python program to solve it. It comes down to being able to represent
range(1,27) through a number of formulas. How do I write a loop that
will loop through thi
10 matches
Mail list logo