Substitute each of the letters by a different decimal digit from 0 to 9 to satisfy this alphametic
square root extraction problem. None of O and P can be 0.
P I E R
--------------------
√ O P E R A T O R |
C T
------------
B E R
B A C
------------------
E P A T
T I A I
----------------------
P I E O R
P I E O R
----------------------
Note: Try to derive a non computer assisted method, although computer program/spreadsheet solutions are welcome.
A computer program that considers only whether PIER^2 = OPERATOR yields:
4975 24750625
5061 25613721
but the second one is ruled out as P*P would be OP, rather than the different CT shown.
OPERATOR is therefore 24750625, while
PIER is 4975.
And C is 1 and B is 24-16 = 8.
Thus, one need not know the entire square-root algorithm.
DEFDBL A-Z
FOR p = 1 TO 9
IF had(p) = 0 THEN
had(p) = 1
FOR o = 1 TO 9
IF had(o) = 0 THEN
had(o) = 1
FOR i = 0 TO 9
IF had(i) = 0 THEN
had(i) = 1
FOR e = 1 TO 9
IF had(e) = 0 THEN
had(e) = 1
FOR r = 0 TO 9
IF had(r) = 0 THEN
had(r) = 1
FOR a = 0 TO 9
IF had(a) = 0 THEN
had(a) = 1
FOR t = 1 TO 9
IF had(t) = 0 THEN
had(t) = 1
pier = p * 1000 + i * 100 + e * 10 + r
operator = o * 10000010 + p * 1000000 + e * 100000 + r * 10001 + a * 1000 + t * 100
IF pier * pier = operator THEN PRINT pier, operator
had(t) = 0
END IF
NEXT
had(a) = 0
END IF
NEXT
had(r) = 0
END IF
NEXT
had(e) = 0
END IF
NEXT
had(i) = 0
END IF
NEXT
had(o) = 0
END IF
NEXT
had(p) = 0
END IF
NEXT
Note the program considers that E and T are also non-zero in keeping with the spirit of such things, though the same two possibilities are supplied even if zero is allowed for these two variables.
|
Posted by Charlie
on 2008-12-13 19:24:34 |