You are given an array nums of k.
Initially, your score is k times:
Select a non empty subarray nums[l...r] where
Identify the element nums[i] in the subarray that has the maximum prime score. If multiple elements have the highest prime score, select the one with the smallest index i.
Multiply your current score by nums[i].
The prime score of an integer is defined as the number of its distinct prime factors. For instance, the prime score of
Return the maximum possible score achievable after applying at most k operations. Since the result may be very large, return it modulo
Constraints:
nums.length
nums[i]
k
You are given an array nums of k.
Initially, your score is k times:
Select a non empty subarray nums[l...r] where
Identify the element nums[i] in the subarray that has the maximum prime score. If multiple elements have the highest prime score, select the one with the smallest index i.
Multiply your current score by nums[i].
The prime score of an integer is defined as the number of its distinct prime factors. For instance, the prime score of
Return the maximum possible score achievable after applying at most k operations. Since the result may be very large, return it modulo
Constraints:
nums.length
nums[i]
k