Determine as many positive integers, N, not ending in 0, as you can, such that N^5 contains two copies of N.
{9, 99, 999, 9999, ... } appears to be the solution set.
For example, 999^5 = 99500
9990004
999-------------------------
for i in (range(1,100000000)):
if i%10 == 0:
continue
s = str(i)
c = str(i**5)
if c.count(str(i)) >=2:
print(i,i**5)
|
Posted by Larry
on 2023-09-19 12:06:33 |