You are given an array of integers nums.
The factor score of an array is defined as the product of the greatest common divisor (GCD) and the least common multiple (LCM) of all its elements.
Return the maximum factor score of nums after removing at most
Note: The factor score of an empty array is
. Both the GCD and LCM of an array with a single element are equal to that element.
Constraints:
nums.length
nums[i]
You are given an array of integers nums.
The factor score of an array is defined as the product of the greatest common divisor (GCD) and the least common multiple (LCM) of all its elements.
Return the maximum factor score of nums after removing at most
Note: The factor score of an empty array is
. Both the GCD and LCM of an array with a single element are equal to that element.
Constraints:
nums.length
nums[i]