Given an integer n, return the n-th ugly number. Ugly numbers are positive numbers whose prime factors are limited to 2, 3, and 5.
n = position in the ugly number sequence
the n-th ugly number
Example 1:
Input:
n = 10
Output:
12
Explanation:
The first 10 ugly numbers end at 12.
Example 2:
Input:
n = 1
Output:
1
Explanation:
The first ugly number is 1.