A challenge from the Mensa Puzzle Calendar
Nicolas
chauvat at no.spam.nerim.net
Wed Oct 9 17:43:11 EDT 2002
Mark McEahern wrote:
> [Marco Mariani]
>
>>BTW, i've tried with permutations but it's even slower, having to loop
>>10! times...
>
>
> Um, it's a puzzle. Who cares how slow it is? Have a beer, kick back,
> relax, and let the bloody thing churn.
>
> For what it's worth, here's a generalized solution that lets you plug in
> somewhat arbitrary equations with single or multiple fixed digits (i.e.,
> like '7' in this one):
More general wins ?
http://www.logilab.org/python-logic/
http://www.logilab.org/python-logic/constraint.html
http://www.logilab.org/python-logic/documentation.html
ftp://ftp.logilab.org/pub/constraint/
I won ;-)
But now you'll complain that puzzles are not as fun anymore...
--
Nicolas Chauvat
More information about the Python-list
mailing list