UVa 136 - Ugly Numbers

136 - Ugly Numbers

 * http://acm.uva.es/p/v1/136.html

Summary
Since there is no input to this problem (you only need to print a certain string), brute forcing will be fine done locally. The number will fit comfortably into a 32-bit signed integer. Instead of brute forcing it, you could use dynamic programming to build up the solution.