A super ugly number is a positive integer whose prime factors are in the array primes.
Given an integer n and a sorted array of distinct primes primes, return the nth super ugly number. The 1st super ugly number is always 1.
Example 1:
Input: n = 12, primes = [2,7,13,19]
Output: 32
Explanation: The super ugly numbers are [1,2,4,7,8,13,14,16,19,26,28,32]. The 12th is 32.
Example 2:
Input: n = 1, primes = [2,3,5]
Output: 1
Explanation: The 1st super ugly number is always 1.
Example 3:
Input: n = 10, primes = [2,3,5]
Output: 12
Explanation: The super ugly numbers are [1,2,3,4,5,6,8,9,10,12]. The 10th is 12.
1 <= n <= 10^61 <= primes.length <= 152 <= primes[i] <= 100primes[i] is guaranteed to be prime.primes are unique and sorted in ascending order.