Re: Arithmetic Puzzle (so simple it's hard)
- To: mathgroup at smc.vnet.net
- Subject: [mg71324] Re: Arithmetic Puzzle (so simple it's hard)
- From: "ben" <benjamin.friedrich at gmail.com>
- Date: Wed, 15 Nov 2006 06:43:17 -0500 (EST)
- References: <ejc4pv$6nf$1@smc.vnet.net>
Bruce Colletti schrieb: > How would this problem be solved in Mathematica? > > BUT * ASK = FEAST, where each letter is a 1-digit number, no two letters may stand for the same number, and the letters are in {0,1,2,4,5,6,7,9}. > > Thankx. > > Bruce Hi Bruce What about brute-force, takes only seconds Do[ If[ (Length[Union[{b, u, t, a, s, k, f, e}]] == 8) && ((100 b + 10 u + t)(100a + 10s + k) == 10000f + 1000 e + 100 a + 10 s + t), Print[b, u, t, a, s, k, f, e, a, s, t]], {b, 1, 9}, {u, 0, 9}, {t, 0, 9}, {a, 1, 9}, {s, 0, 9}, {k, 0, 9}, {f, 1, 9}, {e, 0, 9}] Bye Ben