>>>>> "dg" == dg google groups <[EMAIL PROTECTED]> writes:
dg> It's great how many different sorts of solutions (or almost solutions) dg> this puzzle has generated. Speedwise, for reference my solution posted dg> above takes about 40 seconds on my 1.8GHz laptop, and the less elegant dg> version (on my webpage linked to in the original post) takes about 15 dg> seconds. It seems to me like surely this problem can be more dg> efficiently solved than that? dg> Paul: 758 = 8+(5*((2+4)*25)) For this I get: 2 solutions to: target 758, numbers = (2, 4, 5, 8, 25) (4, 2, 'add', 25, 'mul', 5, 'mul', 8, 'add') (25, 4, 'mul', 5, 'sub', 8, 'mul', 2, 'sub') real 0m0.118s user 0m0.074s sys 0m0.044s Terry -- http://mail.python.org/mailman/listinfo/python-list