Simple Python
Intuition\ncalculate gcd and lcm each time by removing one element\n\n# Complexity\n- Time complexity:\nO(n)\n- Space complexity:\nO(n)\n\n# Code\npython3 []\nc
# Intuition\ncalculate gcd and lcm each time by removing one element\n\n# Complexity\n- Time complexity:\nO(n)\n- Space complexity:\nO(n)\n\n# Code\n```python3 []\nclass Solution:\n    import math\n    def maxScore(self, nums: List[int]) -> int:\n        mx = gcd(*nums) * lcm(*nums)\n        for i in nums:\n            tc = nums.copy()\n            tc.remove(i)\n            temp = gcd(*tc)*lcm(*tc)\n            if mx<temp:\n                mx = temp\n        return mx\n        \n```
['Python3']