#3334
Find the Maximum Factor Score of Array
expert · 1010 · lc medium +32 · 41% accepted · 86 likes · top 21%
Description
You are given an integer array nums.
The factor score of an array is the product of its LCM and its GCD.
Return the maximum factor score achievable by removing at most one element from nums.
Note: both the LCM and GCD of a single-element array equal that element, and the factor score of an empty array is 0.
Code
1
2
3