python3 bruteforce
\n\n# Code\npython3 []\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        if len(nums) == 1:\n            return nums[0]**2\n        ans
\n\n# Code\n```python3 []\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        if len(nums) == 1:\n            return nums[0]**2\n        ans = reduce(lcm,nums)*reduce(gcd,nums)\n        for i in range(len(nums)):\n            temp = nums[:i]+nums[i+1:]\n            ans = max(ans,reduce(lcm,temp)*reduce(gcd,temp))\n        return ans\n```
['Python3']