challenge for programmable calculators
|
12-21-2013, 08:18 PM
Post: #5
|
|||
|
|||
RE: challenge for programmable calculators
[quote= A non-brute-force solution would greatly enlighten this rainy day.
[/quote] I hope the rain has gone :-) %%HP: T(3)A(D)F(.); \<< 1. 9. FOR a 1. 9. FOR b a SQ b * a b SQ * + 1. - NEG DUP SQ a b * 4. * a 100. * b 10. * + * + \v/ + a b * 2. * / DUP FP NOT NOT { DROP } { DUP 10. < { a 100. * b 10. * + + } { DROP } IFTE } IFTE NEXT NEXT \>> EVAL --> 135. 144. after 2.9 seconds (hp 50g) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)