Beautiful number, their ideas, seek correction

If a number is only less than three digits is non-zero, then we call this number beautiful number, we define the extent of this beautiful beautiful number is the sum of all the numbers this number and. There are several beautiful 4,200000,10203 e.g., 4 of which are elegant and beautiful degree of 2,10203 4,200000 that are beautiful 6. Digital 4231,102306,7277420000, not Hello.
Now ask [L, R], the degree of the number of beautiful beautiful number x

Core functions:

The core problem:
• Digital separation: separation bit is stored in an array, bit 10 100 ...... Reverse storage, record-digit

• possible number of species: divided into a number, the sum of two numbers, the sum of three numbers, you can write the algorithm, but with limited and fixed data, it is best to play table

○ a first digital special :( determination, is greater than can be placed) disposed one bit of the digital, behind the bit sequence is set to 0, and the number of digits may be related species
○ 2 first digits :( special judgment, converted to a first boundary several digits, attention range, if the first bit is not 0 are preferably later) is placed in a two digit 2 (ordered), and the remaining bits set to zero order, and the bit number and the number of possible permutations related
○ 3 Analyzing the first special digital :( converted into several boundary first two digits, attention range, the first bit is not 0 are preferably behind, consider the case of multiple numbers of these two) placed in a three digit 3 ( ordered), the rest set to zero, and the number of bits may be species related combinations and permutations
• permutations: functions C (n, m), whichever may be the case in a number of m n is
a number in the range species: last - The next (last note include borders, the next is not inclusive)

Guess you like

Origin www.cnblogs.com/zstu16sb/p/11375461.html