UVa 136 - Ugly Numbers
UVa 136: Ugly Number, a trivial, but interesting UVa problem. The crux involves computing 1500th Ugly number, where a Ugly number is defined as a number whose prime factors are only 2, 3 or 5. Following illustrates a sequence of Ugly numbers: 1,2,3,4,5,6,8,9,10,12,15...
Check numbers to see whether their prime factors are only 2, 3 or 5.
1500th Ugly Number