Easy Java Solution
\n# Code\n\nclass Solution {\n    public int maxDivScore(int[] nums, int[] div) {\n        Arrays.sort(nums);\n        int score=0;\n        int ind=div[0];\n  
\n# Code\n```\nclass Solution {\n    public int maxDivScore(int[] nums, int[] div) {\n        Arrays.sort(nums);\n        int score=0;\n        int ind=div[0];\n        for(int i=0;i<div.length;i++){\n            int count=0;\n            for(int j=0;j<nums.length;j++){\n                if(nums[j]%div[i]==0){\n                    count++;\n                }\n            }\n            if(count>score){\n                score=count;\n                ind=div[i];\n            }\n            if(count==score)\n                ind=Math.min(ind,div[i]);\n        }\n        return ind;\n    }\n}\n```
['Java']