Assuming that none of the numbers contain any leading zero, it can be observed that none of the alphametics: LEVEL+LEVEL = AWESOME or, LEVEL+LEVEL+LEVEL = AWESOME possess any solution. In other words, when LEVEL is added twice (or thrice), it does not equal AWESOME. (Each of the capital letters denotes a different base ten digit from 0 to 9)
(i) What are the respective minimum and maximum number of times that LEVEL can be added to make AWESOME?
(ii) What further solutions are there for (i), assuming that the numbers can contain leading zeroes? Of these additional answers, what are the respective minimum and maximum number of times that LEVEL can be added?
DEFDBL A-Z
FOR num = 11 TO 900
FOR l = 1 TO 9
FOR e = 0 TO 9
IF e <> l THEN
FOR v = 0 TO 9
IF v <> e AND v <> l THEN
used$ = LTRIM$(STR$(l)) + LTRIM$(STR$(e)) + LTRIM$(STR$(v))
level = 10001 * l + 1010 * e + 100 * v
prod = num * level
p$ = LTRIM$(STR$(prod))
IF LEN(p$) = 7 THEN
good = 1
FOR i = 1 TO 7
d$ = MID$(p$, i, 1)
dig = VAL(d$)
SELECT CASE i
CASE 3, 7
IF dig <> e THEN good = 0: EXIT FOR
CASE ELSE
IF INSTR(used$, d$) > 0 THEN good = 0: EXIT FOR
used$ = used$ + d$
END SELECT
NEXT
IF good THEN PRINT num, level; prod
END IF
END IF
NEXT
END IF
NEXT
NEXT
NEXT
finds
multiple
of LEVEL LEVEL AWESOME
37 48284 1786508
42 24942 1047564
49 64246 3148054
59 91819 5417321
75 35453 2658975
83 97279 8074157
112 74547 8349264
126 72427 9125802
127 62426 7928102
142 24942 3541764
144 32823 4726512
153 26562 4063986
155 15851 2456905
155 40704 6309120
169 46564 7869316
174 32923 5728602
176 16861 2967536
194 14641 2840354
275 15851 4359025
279 19691 5493789
338 18581 6280378
445 15851 7053695
525 15351 8059275
575 15051 8654325
575 15751 9056825
The minimum number is 37 and the maximum is 575. To be clear, the number of additions is between 36 and 574, as there is one more occurrence of LEVEL than the number of addition operations.
|
Posted by Charlie
on 2012-09-15 16:17:03 |