jf...@ms4.hinet.net wrote: > Just for fun:-) On my ooold PC, it takes 0.047 seconds to run the > following algorithm on the problem 'SNED + MORE == MONEY".
> def tenThousand(u, Cin): # Cin == M > global n > if Cin == M: > print(S, E, N, D, '+', M, O, R, E, '==', M, O, N, E, Y) > n += 1 And it probably took under two minutes with the brute force approach. So if you were only interested in the result the code below were efficient only if it took at most two more minutes to write it;) But seriously, the next step is to generalize this to work with arbitrary additions... More fun! -- https://mail.python.org/mailman/listinfo/python-list