"Medium"? Ridiculous. (Python, 5 lines)
It\'s an "Easy" problem.\n\n    def maxScore(self, nums: List[int]) -> int:\n        return max(\n            lcm(a) * gcd(a)\n            for i in range(len(nu
It\'s an "Easy" problem.\n\n    def maxScore(self, nums: List[int]) -> int:\n        return max(\n            lcm(*a) * gcd(*a)\n            for i in range(len(nums) + 1)\n            for a in [nums[:i] + nums[i+1:]]\n        )
[]