Преглед на файлове

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