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

Home > General
From proverbs to alphametics (Posted on 2013-02-15) Difficulty: 4 of 5
The proverbs:

The early bird catches the W1.
Where the wolf gets one W2 - he looks for another.
The best horse doesn't always win the W3 .
Better wed over the mixen than over the W4.

The alphametics:

W3+W2=W1
W3-W2=W4

The phrase "The bear came home to the wolf" uses 12 distinct letters, - three of them were not used in the alphametics.

Which three?
What digit was not used in the equations?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
New list | Comment 6 of 8 |
Check this out first: http:  //members.iinet.net.au  /~brianjnow  /perplexus  /Perplexians.html (delete all spaces)

Following advice the program listing was adjusted and then a few minor utility lines were added to give this print-out:

W1 worm 8915
W2 lamb  7453
W3 race  1462
W4 moor 5991




OPEN "c:qb64workproverbs.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 e = 0 TO 9
       IF used(e) = 0 THEN
        used(e) = 1
        FOR l = 1 TO 9
         IF used(l) = 0 THEN
          used(l) = 1
          FOR m = 1 TO 9
           IF used(m) = 0 THEN
            used(m) = 1
            FOR o = 0 TO 9
             IF used(o) = 0 THEN
              used(o) = 1
              FOR r = 1 TO 9
               IF used(r) = 0 THEN
                used(r) = 1
                FOR w = 1 TO 9
                 IF used(w) = 0 THEN
                  used(w) = 1
                  w1 = w * 1000 + o * 100 + r * 10 + m
                  w2 = l * 1000 + a * 100 + m * 10 + b
                  w3 = r * 1000 + a * 100 + c * 10 + e
                  w4 = m * 1000 + o * 100 + o * 10 + r
                  IF w1 = w3 + w2 AND w4 = w2 - w3 THEN
                   PRINT "W1"; w1
                   PRINT "W2"; w2
                   PRINT "W3"; w3
                   PRINT "W4"; w4
                   PRINT #1, "W1 worm"; w1
                   PRINT #1, "W2 lamb"; w2
                   PRINT #1, "W3 race"; w3
                   PRINT #1, "W4 moor"; w4

                  END IF
                  used(w) = 0
                 END IF
                NEXT
                used(r) = 0
               END IF
              NEXT
              used(o) = 0
             END IF
            NEXT
            used(m) = 0
           END IF
          NEXT
          used(l) = 0
         END IF
        NEXT
        used(e) = 0
       END IF
      NEXT
      used(c) = 0
     END IF
    NEXT
    used(b) = 0
   END IF
  NEXT
  used(a) = 0
 END IF
NEXT



Edited on December 21, 2013, 5:52 am
  Posted by brianjn on 2013-02-17 06:41:52

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 (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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