why am I getting TLE in O(nk) solution?
\nclass Solution:\n    def nthSuperUglyNumber(self, n: int, primes: List[int]) -> int:\n        ans=[1]\n        l=[0]*len(primes)\n        for i in range(n):\n
```\nclass Solution:\n    def nthSuperUglyNumber(self, n: int, primes: List[int]) -> int:\n        ans=[1]\n        l=[0]*len(primes)\n        for i in range(n):\n            mini=10**11\n            for j in range(len(primes)):\n                mini=min(primes[j]*ans[l[j]],mini)\n            ans.append(mini)\n            for j in range(len(primes)):\n                if mini==primes[j]*ans[l[j]]:\n                    l[j]+=1\n        # print(ans)\n        return ans[n-1]\n```
[]