Ugly Number II
Ugly number is a number that only have factors 2, 3and 5.
Design an algorithm to find the nth ugly number. The first 10 ugly numbers are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12...
Notice
Note that 1 is typically treated as an ugly number.
Example

浙公网安备 33010602011771号