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

Home > Numbers
SOD cubed equals Sum of Squares of SODs (Posted on 2019-11-20) Difficulty: 3 of 5
Find all 2 digit base 10 integer pairs (X, Y) such that:

  • Y is not larger than X
  • (sod(X*Y))^3 equals (sod(X))^2 + (sod(Y))^2
... where sod(n) indicates the sum of digits of n

  Submitted by Larry    
Rating: 4.0000 (1 votes)
Solution: (Hide)
(14, 73) (28, 50) (46, 50) (50, 64) (50, 82)
Code:
def sod(n):
    """ Input an integer.  Returns the Sum of the Digits  """
    aList = list(str(n))
    ans = 0
    for c in aList:
        ans = ans + int(c)
    return ans

count=0
for i in range(10,100):
    for j in range(i, 100):
        if sod(i*j)**3 == sod(i)**2 + sod(j)**2:
            print(i, j)
            count+= 1
            
print('done', count)

Output:
14 73
28 50
46 50
50 64
50 82
done 5

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle Answer OnlyK Sengupta2022-05-28 23:41:25
Hints/Tipsre: solution? A typoAdy TZIDON2019-11-20 14:36:16
Solutioncomputer-aided solutionCharlie2019-11-20 14:15:56
solution?Jer2019-11-20 13:12:58
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 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information