some straightforward java solution
``` public int nthSuperUglyNumber(int n, int[] primes) {         if(n <= 0){             return 0;         }         int[] ugly = new int[n];         int[] inde
```
public int nthSuperUglyNumber(int n, int[] primes) {
        if(n <= 0){
            return 0;
        }
        int[] ugly = new int[n];
        int[] index = new int[primes.length];
        ugly[0] = 1;
        int next = 1;
        while(next < n){
            ugly[next] = min(ugly, index, primes);
            for(int i = 0; i < primes.length; i ++){
                while(ugly[index[i]] * primes[i] <= ugly[next]){
                    index[i] ++;
                }
            }
            next ++;
        }
        return ugly[n - 1];
    }
    
    public int min(int[] ugly, int[] index, int[] primes){
        int min = Integer.MAX_VALUE;
        for(int i = 0; i < index.length; i ++){
            min = Math.min(min, ugly[index[i]] * primes[i]);
        }
        return min;
    }
```
[]