📜 ⬆️ ⬇️

Problem number 24

A permutation is a linearly ordered set. For example, 3124 is one of the possible permutations of the numbers 1, 2, 3, and 4. If the list of all permutations is sorted numerically or alphabetically, then they say that it has lexicographical order. The lexicographic list of all permutations of the digits 0, 1 and 2 is:

012 021 102 120 201 210

Find the millionth permutation in the lexicographic list of all permutations of the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

')

Source: https://habr.com/ru/post/38340/


All Articles