challenge for programmable calculators
|
12-22-2013, 03:01 PM
(This post was last modified: 12-22-2013 03:58 PM by Thomas Klemm.)
Post: #19
|
|||
|
|||
RE: challenge for programmable calculators
(12-21-2013 06:15 PM)Don Shepherd Wrote: A non-brute-force solution would greatly enlighten this rainy day. This solution for the HP-42S reduces the amount of trials from 729 to 86 by using the symmetry of the expression. Registers: 00: a.009 01: b.009 02: c.009 03: a 04: d = 10*a 05: e = a+b 06: f = a*b 07: g = 10*(d+b) = 10*(10*a+b) Code:
Since we're lucky and the digits of the solutions are in the correct order I'm cheating a little as well and leave that part as an exercise. Cheers and thanks for the challenge Thomas PS: This Python program does the same. Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)