brute force || easy to understand
Code\n\nclass Solution {\npublic:\n    int maxDivScore(vector<int>& nums, vector<int>& divisors) \n    {\n        int score = 0;\n        int ans   = *min_eleme
# Code\n```\nclass Solution {\npublic:\n    int maxDivScore(vector<int>& nums, vector<int>& divisors) \n    {\n        int score = 0;\n        int ans   = *min_element(divisors.begin(),divisors.end());\n\n        for(int i=0;i<divisors.size();i++)\n        {\n            int count = 0;\n            for(int j=0;j<nums.size();j++)\n            {\n                   if((nums[j] % divisors[i]) == 0)\n                   {\n                       count++;\t\n                   }\t\t\n            }\n            if(count > score)\n            {\n                ans = divisors[i];\n                score = count;\n            }\n            else if(count == score and divisors[i] < ans)\n            {\n                 ans = divisors[i];\n            }\n        }\n        return ans;    \n    }\n};\n```
['C++']