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

 Digits 0-9 (Posted on 2009-11-05)
X is a positive eight-digit base ten integer of the form CONSIDER where each of the capital letters in bold denotes a different base ten digit from 0 to 9, and satisfies all of the following conditions, where C is nonzero.

• CO is divisible by 2.
• CON is divisible by 3.
• CONS is divisible by 4.
• CONSI is divisible by 5.
• CONSID is divisible by 6.
• CONSIDE is divisible by 7.
• CONSIDER is divisible by 8.
Determine the respective minimum and maximum value of X.

 No Solution Yet Submitted by K Sengupta Rating: 3.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 ... and the rest (spoilers) | Comment 3 of 4 |

The possible values of x:

12965408
30925864
36925840
38165472
72965480
78320416
78920456
80165472
92765408

DEFDBL A-Z
DIM SHARED used(9), st\$, ct
FOR i = 1 TO 9
used(i) = 1
st\$ = LTRIM\$(STR\$(i))
used(i) = 0
NEXT
PRINT ct
END

FOR i = 0 TO 9
IF used(i) = 0 THEN
used(i) = 1
st\$ = st\$ + LTRIM\$(STR\$(i))
v = VAL(st\$)
IF v MOD LEN(st\$) = 0 THEN
IF LEN(st\$) = 8 THEN
PRINT st\$: ct = ct + 1
ELSE
END IF
END IF
st\$ = LEFT\$(st\$, LEN(st\$) - 1)
used(i) = 0
END IF
NEXT
END SUB

 Posted by Charlie on 2009-11-05 16:58:13

 Search: Search body:
Forums (0)