aboutsummaryrefslogtreecommitdiff
path: root/python/52-permuted_multiples.py
blob: c7711e2d80377cbf14839ca805ba290f1bc72cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from itertools import count


found = False
for i in count(1):
    foo = [sorted(str(i * x)) for x in range(1, 7)]
    
    for w in foo[1:]:
        found = True
        if w != foo[0]:
            found = False
            break

    if found:
        print(i)
        break