108ms easy to understand java solution
public int nthSuperUglyNumber(int n, int[] primes) {\n        int[] ret    = new int[n];\n              ret[0] = 1;\n\n        int[] indexes  = new int[primes.l
    public int nthSuperUglyNumber(int n, int[] primes) {\n        int[] ret    = new int[n];\n              ret[0] = 1;\n\n        int[] indexes  = new int[primes.length];\n       \n        for(int i = 1; i < n; i++){\n            ret[i] = Integer.MAX_VALUE;\n            \n            for(int j = 0; j < primes.length; j++){\n                ret[i] = Math.min(ret[i], primes[j] * ret[indexes[j]]);\n            }\n            \n            for(int j = 0; j < indexes.length; j++){\n                if(ret[i] == primes[j] * ret[indexes[j]]){\n                    indexes[j]++;\n                }\n            }\n        }\n        \n        return ret[n - 1];\n    }
[]