C++ Brute force Approach ( 100 % Beats Solution )  Easy to Understand For Beginners
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```\nclass Solution {\npublic:\n    int maxDivScore(vector<int>& nums, vector<int>& divisors)\n    {\n        sort(divisors.begin(),divisors.end());\n        int max_score=0;\n        int ans=divisors[0];\n        for(int i=0;i<nums.size();i++)\n        {\n            if(nums[i]%divisors[0]==0)\n                max_score++;\n        }    \n        for(int i=1;i<divisors.size();i++)\n        {\n            int number=divisors[i];\n            int score=0;\n            for(int j=0;j<nums.size();j++)\n            {\n                if(nums[j]%number==0)\n                    score++;\n            }\n            if(max_score<score)\n            {\n                max_score=score;\n                ans=number;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']