C++ Easy Solution.
\n# Code\ncpp []\nclass Solution {\npublic:\n    long long maxScore(vector<int>& nums) {\n        long long ans=0, gcd1=0, lcm1=0;\n        // Removing no eleme
\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long maxScore(vector<int>& nums) {\n        long long ans=0, gcd1=0, lcm1=0;\n        // Removing no element\n        for(int i=0; i<nums.size(); i++){\n            if(gcd1==0){gcd1=1LL*nums[i];}\n            else{gcd1=__gcd(gcd1, 1LL*nums[i]);}\n            if(lcm1==0){lcm1=nums[i];}\n            else{lcm1=(lcm1*nums[i])/__gcd(lcm1,1LL*nums[i]);}\n        }\n        ans=lcm1*gcd1;\n        // Removing atmost one element\n        for(int i=0; i<nums.size(); i++){\n            long long gcd=0, lcm=0;\n            for(int j=0; j<nums.size(); j++){\n                if(i!=j){\n                  if(gcd==0){gcd=1LL*nums[j];}\n                  else{gcd=__gcd(gcd, 1LL*nums[j]);}\n                  if(lcm==0){lcm=nums[j];}\n                  else{lcm=(lcm*nums[j])/__gcd(lcm,1LL*nums[j]);}\n                }\n            }\n            ans=max(ans, (lcm*gcd));\n        }\n        return ans;\n    }\n};\n\n```
['C++']