C++|| Simple divisibility check
Intuition\n Describe your first thoughts on how to solve this problem. \nCheck if a number divides another number.\n\n# Approach\n Describe your approach to sol
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nCheck if a number divides another number.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nFor each divisors[i]--> if nums[j] is divisible by divisors[i], then increment the divisibiltiy score of divisors[i]\n\n# Complexity\n- Time complexity: O(mn), m= length of divisors, n= length of nums\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maxDivScore(vector<int>& v, vector<int>& d) {\n        int maxD= 0, ans=*min_element(d.begin(), d.end());\n        for(int i=0;i<d.size();i++){\n            int c=0;\n            for(int j=0;j<v.size();j++){\n                if(v[j]%d[i]==0) c++;\n            }\n            if(c>=maxD){\n                if(c>maxD){\n                maxD= c; ans= d[i];\n                }\n                else{\n                    ans= min(ans, d[i]);\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']