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

 Rock n' roll alphametic (Posted on 2010-03-09)
Substitute each of the small 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.

(elvis)*a + presley + 1935 + 1977 + p = ppppppp, and:

play is divisible by 17

 No Solution Yet Submitted by K Sengupta Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 3 of 4 |

DEFDBL A-Z
FOR e = 1 TO 9
used(e) = 1
FOR a = 1 TO 9
IF used(a) = 0 THEN
used(a) = 1
FOR p = 1 TO 9
IF used(p) = 0 THEN
used(p) = 1
FOR l = 0 TO 9
IF used(l) = 0 THEN
used(l) = 1
FOR v = 0 TO 9
IF used(v) = 0 THEN
used(v) = 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 r = 0 TO 9
IF used(r) = 0 THEN
used(r) = 1
FOR y = 0 TO 9
IF used(y) = 0 THEN
used(y) = 1

elvis = e * 10000 + l * 1000 + v * 100 + i * 10 + s
presley = p * 1000000 + r * 100000 + e * 10000 + s * 1000 + l * 100 + e * 10 + y
p7 = p * 1111111
IF elvis * a + presley + 1935 + 1977 + p = p7 THEN
play1 = p * 1000 + l * 100 + a * 10 + y
IF play1 MOD 17 = 0 THEN
PRINT elvis; a; presley
END IF
END IF

used(y) = 0
END IF
NEXT
used(r) = 0
END IF
NEXT
used(s) = 0
END IF
NEXT
used(i) = 0
END IF
NEXT
used(v) = 0
END IF
NEXT
used(l) = 0
END IF
NEXT
used(p) = 0
END IF
NEXT
used(a) = 0
END IF
NEXT
used(e) = 0
NEXT

finds "elvis a presley" to represent

82495  7  6085283

 Posted by Charlie on 2010-03-09 13:49:23

 Search: Search body:
Forums (0)