I have replaced each of the
0 to 9 digits by one of the letters appearing in the English word for that letter.
Trying to decode the multiplication data below, please remember that while
Z identifies
0 and
X should clearly be replaced by
6,- a string like
OOO might represent any of the
4^3 =64 combinations since four digits
(0,1,2, and 4 ) contain the letter
O in the corresponding word.
Bear in mind that any digit might be represented by distinct letters e.g.
5 might be
F in one place and
V in another.
Still, I KNOW my question is solvable and there is probably only one solution.
Should I err – please post all possible combinations complying with:
WIT
*ORE
=======
WWVN
EEE
OOOW
=======
ENORIN
Clearly - no leading zeroes.
CLS
DEFDBL A-Z
DATA ZERO,ONE,TWO,THRE,FOUR,FIVE,SIX,SEVN,EIGHT,NIE,TEN
FOR ptr = 0 TO 9
READ nam$(ptr)
ix = INSTR(nam$(ptr), "W"): IF ix > 0 THEN w$ = w$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "I"): IF ix > 0 THEN i$ = i$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "T"): IF ix > 0 THEN t$ = t$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "O"): IF ix > 0 THEN o$ = o$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "R"): IF ix > 0 THEN r$ = r$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "E"): IF ix > 0 THEN e$ = e$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "N"): IF ix > 0 THEN n$ = n$ + LTRIM$(STR$(ptr))
ix = INSTR(nam$(ptr), "V"): IF ix > 0 THEN v$ = v$ + LTRIM$(STR$(ptr))
NEXT
PRINT w$
PRINT i$
PRINT t$
PRINT o$
PRINT r$
PRINT e$
PRINT n$
PRINT v$
FOR wp = 1 TO LEN(w$)
w = VAL(MID$(w$, wp, 1))
FOR ip = 1 TO LEN(i$)
i = VAL(MID$(i$, ip, 1))
FOR tp = 1 TO LEN(t$)
t = VAL(MID$(t$, tp, 1))
FOR op = 1 TO LEN(o$)
o = VAL(MID$(o$, op, 1))
FOR rp = 1 TO LEN(r$)
r = VAL(MID$(r$, rp, 1))
FOR ep = 1 TO LEN(e$)
e = VAL(MID$(e$, ep, 1))
wit = 100 * w + 10 * i + t
ore = 100 * o + 10 * r + e
enorin = wit * ore
enorin$ = LTRIM$(STR$(enorin))
IF LEN(enorin$) = 6 THEN
IF INSTR(e$, MID$(enorin$, 1, 1)) > 0 THEN
IF INSTR(n$, MID$(enorin$, 2, 1)) > 0 THEN
IF INSTR(o$, MID$(enorin$, 3, 1)) > 0 THEN
IF INSTR(r$, MID$(enorin$, 4, 1)) > 0 THEN
IF INSTR(i$, MID$(enorin$, 5, 1)) > 0 THEN
IF INSTR(n$, MID$(enorin$, 6, 1)) > 0 THEN
PRINT wit; ore, enorin
PRINT " "; wit
PRINT " "; ore
PRINT " ------"
PRINT " "; wit * e
PRINT " "; wit * r
PRINT wit * o
PRINT " ------"
PRINT enorin
END IF
END IF
END IF
END IF
END IF
END IF
END IF
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
finds
253
439
------
2277
759
1012
------
111067
|
Posted by Charlie
on 2013-08-22 16:10:47 |