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

Home > Just Math
Tower Travail (Posted on 2013-05-10) Difficulty: 3 of 5
                
          +---+                         +---+
          | 9 | 9                      |   | 9 
          +---+                         +---+
          | 8 | 8                      |   | 8
          +---+                         +---+   
          | 1 | 7                      |   | 7
          +---+                         +---+  
          | 0 | 6                      |   | 6
          +---+                         +---+ 
          | 5 | 5                      |   | 5
          +---+                         +---+
          | 4 | 4                      |   | 4
          +---+                         +---+  
         | 3 | 3                     |   | 3
+---+---+ +---+               +---+---+ +---+
| 7 | 2 | | 6 | 2            |   |   | |   | 2
+---+---+ +---+               +---+---+ +---+
As the elevator rises along the eight-floor tower, it forms a series of three- digit numbers by combining the 72 in the elevator with the digit on the floor.

What's more, these three-digit numbers are multiples of 2, 3, 4, etc., up to 9. (That is, on the lowest floor, 726 is evenly divisible by 2, on the next floor, 723 is evenly divisible by 3, and so on.)

Find another arrangement for the digits 0 to 9 (using each digit exactly once, one digit per box) so that the elevator isn't 72 and the combinations of the elevator with the level form an appropriate multiple.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Different Listing Comment 2 of 2 |
The following listing yields the same results as found by Charlie:
OPEN "C:\QB64\WORK\ELEVATOR.txt" FOR OUTPUT AS #1

FOR a = 0 TO 9
 IF used(a) = 0 THEN
  used(a) = 1
  FOR b = 0 TO 9
   IF used(b) = 0 THEN
    used(b) = 1
    FOR c = 0 TO 9
     IF used(c) = 0 THEN
      used(c) = 1
      FOR d = 0 TO 9
       IF used(d) = 0 THEN
        used(d) = 1
        FOR e = 0 TO 9
         IF used(e) = 0 THEN
          used(e) = 1
          FOR f = 0 TO 9
           IF used(f) = 0 THEN
            used(f) = 1
            FOR g = 0 TO 9
             IF used(g) = 0 THEN
              used(g) = 1
              FOR h = 0 TO 9
               IF used(h) = 0 THEN
                used(h) = 1
                FOR i = 0 TO 9
                 IF used(i) = 0 THEN
                  used(i) = 1
                  FOR j = 1 TO 9
                   IF used(j) = 0 THEN
                    used(j) = 1
                    sc = 0
                    s = j * 100 + i * 10 + a
                    t = j * 100 + i * 10 + b
                    u = j * 100 + i * 10 + c
                    v = j * 100 + i * 10 + d
                    w = j * 100 + i * 10 + e
                    x = j * 100 + i * 10 + f
                    y = j * 100 + i * 10 + g
                    z = j * 100 + i * 10 + h
                    IF s / 9 = INT(s / 9) THEN sc = sc + 1
                    IF t / 8 = INT(t / 8) THEN sc = sc + 1
                    IF u / 7 = INT(u / 7) THEN sc = sc + 1
                    IF v / 6 = INT(v / 6) THEN sc = sc + 1
                    IF w / 5 = INT(w / 5) THEN sc = sc + 1
                    IF x / 4 = INT(x / 4) THEN sc = sc + 1
                    IF y / 3 = INT(y / 3) THEN sc = sc + 1
                    IF z / 2 = INT(z / 2) THEN sc = sc + 1
                    IF sc = 8 THEN
                     PRINT j * 100 + i * 10; a; b; c; d; e; f; g; h
                     PRINT #1, j * 100 + i * 10; a; b; c; d; e; f; g; h
                    END IF

                    used(j) = 0
                   END IF
                  NEXT
                  used(i) = 0
                 END IF
                NEXT
                used(h) = 0
               END IF
              NEXT
              used(g) = 0
             END IF
            NEXT
            used(f) = 0
           END IF
          NEXT
          used(e) = 0
         END IF
        NEXT
        used(d) = 0
       END IF
      NEXT
      used(c) = 0
     END IF
    NEXT
    used(b) = 0
   END IF
  NEXT
  used(a) = 0
 END IF
NEXT


CLOSE 1

Finds:
 530  1  6  9  4  0  2  7  8
 720  9  0  1  6  5  4  3  8
 720  9  0  1  6  5  8  3  4
 720  9  8  1  0  5  4  3  6
 720  9  8  1  6  5  0  3  4
 720  9  8  1  6  5  4  3  0

Note that the 3 digit numerals in the left column are the values of the elevator. The numbers in bold, at the right, are to be added to the elevator value.  538 is the only value not preceded by "72".



  Posted by brianjn on 2013-05-10 19:22:14
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 (2)
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