소스 검색

Lexicographic permutations

Adel Qalieh 13 년 전
부모
커밋
e2f6a60f28
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      24.py

+ 8 - 0
24.py

@@ -0,0 +1,8 @@
+from itertools import permutations
+
+lexorder = 1
+
+for permutation in permutations("0123456789", 10):
+	if lexorder == 1000000:
+		print ''.join(permutation)
+	lexorder += 1