Substitute each of the capital letters by a different digit from 0 to 9 to satisfy this set of alphametic relationships. None of the numbers can contain any leading zero.
The arithmetic mean of NOD and FIFE is FERN, and:
The geometric mean of NOD and FIFE is FOND, and:
The harmonic mean of NOD and FIFE is FOOD.
Note: For an extra challenge, solve this puzzle without using a computer program.
(In reply to
Surprised by brianjn)
My program was a slovenly creation that took the shortcut of permuting all 10 digits though only 7 would be needed, and therefore produced the solution six times overone for each permutation of the remaining three digits. It took longer to run, but was shorter to write. It did indeed, though, test only the arithmetic and geometric means, and that was sufficient to get the unique (albeit repeated six times) solution.
DECLARE SUB permute (a$)
CLS
a$ = "0123456789": h$ = a$
DO
n = VAL(MID$(a$, 3, 1))
o = VAL(MID$(a$, 4, 1))
d = VAL(MID$(a$, 5, 1))
f = VAL(MID$(a$, 6, 1))
i = VAL(MID$(a$, 7, 1))
e = VAL(MID$(a$, 8, 1))
r = VAL(MID$(a$, 9, 1))
nod = 100 * n + 10 * o + d
fife = 1010 * f + 100 * i + e
fern = 1000 * f + 100 * e + 10 * r + n
fond = 1000 * f + 100 * o + 10 * n + d
food = 1000 * f + 110 * o + d
IF fern  nod = fife  fern THEN
IF fond * fond = nod * fife THEN
PRINT nod; fife; fern; fond; food
END IF
END IF
permute a$
LOOP UNTIL a$ = h$

Posted by Charlie
on 20120627 10:25:45 