leetcode 264. 丑数 II (python)

本题,选择乘2,3,5因子,根据因子判断不断变大的丑数。

class Solution:
    def nthUglyNumber(self, n):
        """
        :type n: int
        :rtype: int
        """
        t1 = 0
        t2 = 0
        t3 = 0
        #分别为2,3,5三个因子
        res = [1]
        while len(res) 

你可能感兴趣的:(leetcode,python,leetcode,python,(学习))