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

Home > Just Math
Mod 3 alphametics (Posted on 2014-04-15) Difficulty: 3 of 5
In a certain multiplication sample all the digits were replaced by their mod 3 value (e.g. 875 became 212),rendering:
1202*102=222210
Please restore the original sample and either show that there are no others or provide extra solutions.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution In Basic code Comment 2 of 2 |

DEFDBL A-Z
OPEN "mod 3 alphametics.txt" FOR OUTPUT AS #2
FOR a = 1 TO 9 STEP 3
    FOR b = 2 TO 9 STEP 3
        FOR c = 0 TO 9 STEP 3
            FOR d = 2 TO 9 STEP 3
                FOR e = 1 TO 9 STEP 3
                    FOR f = 0 TO 9 STEP 3
                        FOR g = 2 TO 9 STEP 3
                            m1 = 1000 * a + 100 * b + 10 * c + d
                            m2 = 100 * e + 10 * f + g
                            prod = m1 * m2
                            prods$ = LTRIM$(STR$(prod))
                            IF LEN(prods$) = 6 THEN
                                good = 1
                                FOR i = 1 TO 6
                                    v1 = VAL(MID$(prods$, i, 1)) MOD 3
                                    v2 = VAL(MID$("222210", i, 1))
                                    IF v1 <> v2 THEN good = 0
                                NEXT
                                IF good THEN
                                    PRINT m1; m2, prod
                                    PRINT #2, m1; m2, prod
                                END IF
                            END IF
                        NEXT
                    NEXT
                NEXT
            NEXT
        NEXT
    NEXT
NEXT
CLOSE

finds


 1202  435     522870
 1268  462     585816
 1292  198     255816
 1505  168     252840
 1598  162     258876
 1832  138     252816
 1898  465     882570
 4232  195     825240
 4265  138     588570
 4298  192     825216
 4595  192     882240
 4598  192     882816
 7862  105     825510


  Posted by Charlie on 2014-04-15 16:21:51
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 (4)
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