java solution
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 {\n    public int maxDivScore(int[] nums, int[] divisors) {\n        int max= 0;\n        int min=0;\n     for(int j=0;j<divisors.length;j++)\n        {\n        int count=0;\n            for(int i=0;i<nums.length;i++)\n            { if((nums[i]%divisors[j])==0)\n            {\n                count++;\n            }\n            }\n         if(max<=count)\n         {\n             if(count>max)\n             {max=count;\n             min=divisors[j];\n             }\n             else\n             {\n                if(min==0)\n                {\n                    min=divisors[j];\n                    max=count;\n                }\n                 else\n                 {\n                     if(divisors[j]<min)\n                         min=divisors[j];\n                 }\n             }\n         }\n        \n         \n        }\n        \n        \n        return min;\n        \n        \n    }\n}\n```
['Java']