JAVA Solution
\nclass Solution {\n    public int nthSuperUglyNumber(int n, int[] primes) {\n        int index[] = new int[primes.length];\n        int result[] = new int[n];\
```\nclass Solution {\n    public int nthSuperUglyNumber(int n, int[] primes) {\n        int index[] = new int[primes.length];\n        int result[] = new int[n];\n        \n        result[0]=1;\n        for (int i = 1; i < n; i++) {\n            int min = Integer.MAX_VALUE;\n            for(int j=0;j<primes.length;j++){\n                min = Math.min(min, primes[j]*result[index[j]]);\n            }\n            result[i] = min;\n            \n            for(int j=0;j<primes.length;j++){\n                if(result[i] == primes[j]*result[index[j]]){\n                    index[j]++;   \n                }\n            }\n        }\n         return result[n-1];\n    }\n       \n}\n```
['Java']