Untitled
unknown
plain_text
3 years ago
266 B
4
Indexable
from itertools import permutations
p = permutations(str(123456789))
a = [int(''.join(x)) for x in p]
for x in a:
test=[]
for i in range(1,8):
y=str(x)
rest=int(y[0:i])%(i+1)
test.append(rest)
if sum(test)==0:
print(x)Editor is loading...