radhe radhe || simple and easy solution || beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int gcd(long long a,long long b){\n        if(!b)return a;\n        return gcd(b,a%b);\n    }\n    long long solve(multiset<long long> &st){\n        long long a1=-1,a2=-1;\n        for(auto &&val:st){\n            if(a1==-1)a1=val,a2=val;\n            else{\n                a1=gcd(a1,val);\n                a2=(a2*val)/gcd(a2,val);\n            }\n        }\n        return a1*a2;\n    }\n    long long maxScore(vector<int>& nums) {\n        multiset<long long> st(nums.begin(),nums.end());\n        long long ans=solve(st);\n        for(auto &&val:nums){\n            st.erase(st.find(val));\n            ans=max(ans,solve(st));\n            st.insert(val);\n        }\n        return ans;\n    }\n};\n```
['C++']