"Truth is always strange,..."
(9048'3 256)
W O R D
* L I S T
x x x x D
x x x R
x x x x O
x x x x W
x x x x x x x x
FOR w = 1 TO 9
used(w) = 1
FOR o = 0 TO 9
IF used(o) = 0 THEN
used(o) = 1
FOR r = 0 TO 9
IF used(r) = 0 THEN
used(r) = 1
FOR d = 0 TO 9
IF used(d) = 0 THEN
used(d) = 1
FOR i = 0 TO 9
IF used(i) = 0 THEN
used(i) = 1
FOR s = 0 TO 9
IF used(s) = 0 THEN
used(s) = 1
FOR t = 0 TO 9
IF used(t) = 0 THEN
used(t) = 1
FOR l = 1 TO 9
IF used(l) = 0 THEN
used(l) = 1
word = w * 1000 + o * 100 + r * 10 + d
l1 = word * t
IF l1 MOD 10 = d AND l1 > 9999 AND l1 < 100000 THEN
l2 = word * s
IF l2 MOD 10 = r AND l2 > 999 AND l2 < 10000 THEN
l3 = word * i
IF l3 MOD 10 = o AND l3 > 9999 AND l1 < 100000 THEN
l4 = word * l
IF l4 MOD 10 = w AND l4 > 9999 AND l2 < 100000 THEN
PRINT word, l; i; s; t
END IF
END IF
END IF
END IF
used(l) = 0
END IF
NEXT l
used(t) = 0
END IF
NEXT t
used(s) = 0
END IF
NEXT s
used(i) = 0
END IF
NEXT i
used(d) = 0
END IF
NEXT d
used(r) = 0
END IF
NEXT r
used(o) = 0
END IF
NEXT o
used(w) = 0
NEXT w
Finds that WORD and LIST are 2048 and 9536 respectively.
9048'3 256 become's LORD'S WIT, with the lord in question being Lord Byron, who is quoted as saying “For truth is always strange; stranger than fiction.”
|
Posted by Charlie
on 2012-04-12 12:20:25 |