Python Dynamic Programming
class Solution:\n    def nthUglyNumber(self, n: int) -> int:\n        \n\n            res = [1]\n            i = j = k = 0\n            count = 0\n            \
class Solution:\n    def nthUglyNumber(self, n: int) -> int:\n        \n\n            res = [1]\n            i = j = k = 0\n            count = 0\n            \n            while count < n:\n                val = min(res[i]*2,min(res[j]*3,res[k]*5))\n                if val == res[i]*2:\n                    i+=1\n                if val == res[j]*3:\n                    j+=1\n                if val == res[k]*5:\n                    k+=1\n                count+=1\n                if count == n:\n                    return res[-1]\n                res.append(val)
['Dynamic Programming', 'Python', 'Python3']