Lets create a system of numbers where the biggest digit in the nth place value (counting from right to left) of a number length m is always equal to m - n + 1. To give an example the largest 5 digit number expressible in this system is written 12345. Apart from the number of digits available to be used in a particular place being restricted, all other incrementation is standard. Namely when a digit is to surpass its digit limit we add one to the next digit.
Here is how counting would be represented in this system:
1; 10; 11; 12; 100; 101; 102; 103; 110; 111; 112; 113; 120; 121; 122; 123; 1000; 1001 ...
Your task is to write a function that takes a standard base 10 number and converts it to my numbering system.
Shorter code is preferable. Bonne Chance!
**If you need digits after 9 (you should) you can choose to use letters, or you can you return a 2 digit number as an element of a list.
10 -> 111 20 -> 1003 30 -> 1023 50 -> 1123 100 -> 10035 23116 -> 1234567 21977356 -> 123456789A
Last case may be incredibly slow to run depending on how you implemented. You don't need to run it if it takes too long or uses too much memory. However note that there exist ways to have it run quickly and using little memory.