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

Home > Just Math
Poetry, not poverty (Posted on 2019-12-18) Difficulty: 3 of 5
BOY*GIRL=POETRY

To each one of the ten distinct letters a corresponding digit should be allocated, making the above equation true.

Please find the 1 to 1 matching.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution (Python) | Comment 2 of 3 |
BOY*GIRL=POETRY
265*1739=460835
---------------
count = 0
for v0 in range(1,10):
    for v1 in range(0,10):
        if v0==v1:
            continue
        for v2 in range(0,10):
            if v0==v2 or v1==v2:
                continue
            for v3 in range(1,10):
                if v0==v3 or v1==v3 or v2==v3:
                    continue
                for v4 in range(0,10):
                    if v0==v4 or v1==v4 or v2==v4 or v3==v4:
                        continue
                    for v5 in range(0,10):
                        if v0==v5 or v1==v5 or v2==v5 or v3==v5 or v4==v5:
                            continue
                        for v6 in range(0,10):
                            if v0==v6 or v1==v6 or v2==v6 or v3==v6 or v4==v6 or v5==v6:
                                continue
                            for v7 in range(1,10):
                                if v0==v7 or v1==v7 or v2==v7 or v3==v7 or v4==v7 or v5==v7 or v6==v7:
                                    continue
                                for v8 in range(0,10):
                                    if v0==v8 or v1==v8 or v2==v8 or v3==v8 or v4==v8 or v5==v8 or v6==v8 or v7==v8:
                                        continue
                                    for v9 in range(0,10):
                                        if v0==v9 or v1==v9 or v2==v9 or v3==v9 or v4==v9 or v5==v9 or v6==v9 or v7==v9 or v8==v9:
                                            continue
                                        BOY = 100*v0 + 10*v1 + v2
                                        GIRL = 1000*v3 + 100*v4 + 10*v5 + v6
                                        POETRY = 100000*v7 + 10000*v1 + 1000*v8 + 100*v9 + 10*v5 + v2
                                        if BOY*GIRL == POETRY:
                                            count +=1
                                            print(int(BOY), int(GIRL), int(POETRY))
print('done', int(count))

  Posted by Larry on 2019-12-18 15:21:09
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