Search⌘ K
AI Features

Super Ugly Number

Super Ugly Number gives you an index and a sorted list of distinct primes; return the positive number at that position whose only prime factors come from the list.

Statement

Given an integer n and an array of distinct prime numbers primes, return the n ...