Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
327 B
1
Indexable
Never
from itertools import *
box = []
for k in range(1, 3 + 1):
    for i in product('0123456789', repeat=k):
        for j in range(0, 9 + 1):
            n = int(f'2{j}1' + ''.join(i) + '67')
            if (n <= 10 ** 7) and (n % 159 == 0):
                box.append(n)
box = sorted(box)
[print(i, i//159) for i in box]