XYZ is a 3-digit number. If you multiply it by 2 ten times, then you will get a number that only uses the digits X, Y, and Z. Find all possible values of XYZ.
431 441344
436 446464
523 535552
650 665600
862 882688
---------
f = 2**10
all_values = []
num3digits = []
for i in range(100,1000):
digits1 = sorted(list(set(str(i))))
digits2 = sorted(list(set(str(i*1024))))
if set(digits2).issubset(set(digits1)):
num3digits.append(i)
if digits1 not in all_values:
all_values.append(digits1)
print(i, i*1024)
|
Posted by Larry
on 2023-01-12 11:13:26 |