A 4-digit zeroless number N=ABCD has a certain specific feature:
The last 3 digits of a product ABCD*DCBA are zeros.
List all such numbers, explaining your reasoning.
ABCD DCBA ABCD*DCBA:
4625 5264 24346000
4875 5784 28197000
5216 6125 31948000
5264 4625 24346000
5736 6375 36567000
5784 4875 28197000
6125 5216 31948000
6375 5736 36567000
Above is the output of this Python program:
def revN(n):
return int(str(n)[::-1])
for A in range(1,10):
for B in range(1,10):
for C in range(1,10):
for D in range(1,10):
x = 1000*A + 100*B + 10*C + D
y = revN(x)
p = x*y
if (p/1000)%1 == 0:
print(x,y,p)
|
Posted by Larry
on 2020-06-03 10:45:35 |