UVa 640 - Self Numbers

UVa 640 | Self Numbers

 * https://onlinejudge.org/external/6/640.pdf

Explanation
The problem is pretty easy. Simply calculate d(n) from n=1 to n=1000000 and "unselect" all results in an array form 1 to 1000000. The rest is the result magnitude.

Output
1 3 5 7 9 20 31 42 53 64 | |      <-- a lot more numbers | 9903 9914 9925 9927 9938 9949 9960 9971 9982 9993 | | |

Solutions

 * Code All the Problems