problem24.py 175 B

1234567
  1. #!/usr/bin/env python
  2. from itertools import permutations
  3. for i, p in enumerate(permutations(range(10))):
  4. if i == 999999:
  5. print ''.join(map(str, p))
  6. break