RE: Smarter algo, was Re: 03 digression by brute force

2018-12-14 Thread Avi Gross
REAL SUBJECT: Analysis of alternate algorithms. Peter & Jach and anyone interested, As Peter said in his altered subject line, Jack changed directions from tweaking an algorithm to trying something quite different. Reminder of the problem. Horizontal View: SEND + MORE = MONEY Vertical View:

Smarter algo, was Re: 03 digression by brute force

2018-12-14 Thread Peter Otten
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) >