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

Home > Numbers
Digits 0-9 (Posted on 2009-11-05) Difficulty: 3 of 5
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.)
Solution ... and the rest (spoilers) | Comment 3 of 4 |

The possible values of x:

12965408
30925864
36925840
38165472
72965480
78320416
78920456
80165472
92765408

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

SUB addOn
 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
        addOn
      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
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information