52.py 258 B

12345678910111213141516171819
  1. #!/usr/bin/python
  2. def digits(n):
  3. return set(list(str(n)))
  4. x = 1
  5. while True:
  6. found = True
  7. d = digits(x)
  8. for i in range(2, 7):
  9. if digits(i * x) != d:
  10. found = False
  11. if found:
  12. print x
  13. break
  14. x += 1