Just for fun: Countdown numbers game solver
arnodel at googlemail.com
Mon Jan 21 18:11:55 CET 2008
On Jan 21, 9:01 am, dg.google.gro... at thesamovar.net wrote:
> Arnaud: I haven't had time to play with your solution yet - how quick
> does it run?
Ok I've done some quick timings, it's faster than I remembered it:
numbers = [2, 4, 5, 8, 25]
target = 758
Average time to find
(1) best solution (in terms of length of repr): 0.0418s
(2) first solution: 0.00421s
(2.2GHz MacBook Pro, done with the timeit module)
(1) involves working out all possible calculations with the 6 numbers.
More information about the Python-list