All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Three W answers (Posted on 2011-02-27)
Find the minimal and maximal amounts of money in the following base 10 alphametics:

NOW+SHOW+ME+YOUR=MONEY

For both cases find the values corresponding to "WHY","WHEN", & "WHO ME".

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(2): Prelim | Comment 4 of 6 |

`now  show  me  your  money230  8630  15  4379  13254257  8457  13  6509  15236259  6459  13  8507  15238264  8364  19  7650  16297269  8369  15  7604  16257420  5820  19  6237  12496428  6728  10  5239  12405429  5729  10  6238  12406562  8362  14  7609  16547620  7820  19  4235  12694624  8724  15  3290  12653752  6352  10  8594  15708823  6723  10  5249  12805834  5634  10  7329  13807923  4823  16  7205  12967`
` `

Smallest and largest can be found by inspection:12405 and 16547.

DEFDBL A-Z
FOR n = 1 TO 9
used(n) = 1
FOR o = 0 TO 9
IF used(o) = 0 THEN
used(o) = 1
FOR w = 0 TO 9
IF used(w) = 0 THEN
used(w) = 1
now = n * 100 + o * 10 + w
FOR s = 1 TO 9
IF used(s) = 0 THEN
used(s) = 1
FOR h = 0 TO 9
IF used(h) = 0 THEN
used(h) = 1
show = s * 1000 + h * 100 + o * 10 + w
FOR m = 1 TO 9
IF used(m) = 0 THEN
used(m) = 1
FOR e = 0 TO 9
IF used(e) = 0 THEN
used(e) = 1
me = m * 10 + e
FOR y = 1 TO 9
IF used(y) = 0 THEN
used(y) = 1
money = 10000 * m + 1000 * o + 100 * n + 10 * e + y
FOR u = 0 TO 9
IF used(u) = 0 THEN
used(u) = 1
FOR r = 0 TO 9
IF used(r) = 0 THEN
used(r) = 1
your = 1000 * y + 100 * o + 10 * u + r
IF now + show + me + your = money THEN
PRINT now; show; me; your; money
END IF
used(r) = 0
END IF
NEXT
used(u) = 0
END IF
NEXT
used(y) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(m) = 0
END IF
NEXT
used(h) = 0
END IF
NEXT
used(s) = 0
END IF
NEXT
used(w) = 0
END IF
NEXT
used(o) = 0
END IF
NEXT
used(n) = 0
NEXT

 Posted by Charlie on 2011-02-28 11:32:38

 Search: Search body:
Forums (0)