(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
|