Python beat 93.68%
class Solution(object):\n        def nthSuperUglyNumber(self, n, primes):\n            """\n            :type n: int\n            :type primes: List[int]\n     
    class Solution(object):\n        def nthSuperUglyNumber(self, n, primes):\n            """\n            :type n: int\n            :type primes: List[int]\n            :rtype: int\n            """\n            nums=[1]*len(primes)\n            idx=[0]*len(primes)\n            best=[1]\n            cur=1\n            for i in xrange(n-1):\n                for j in xrange(len(idx)):\n                    if nums[j]==cur:\n                        nums[j]=best[idx[j]]*primes[j]\n                        idx[j]+=1\n                cur=min(nums)\n                best.append(cur)\n            return best[-1]
['Python']