beats 100% java Simple code
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nwe are takin a boolean 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nwe are takin a boolean  variable as false to check whether the count remains 0 case.\nso what we did is we first ran the outer loop for divisor array then we run a inner loop for nums array and go on checking for the count of nums element those are divisible by divisor array element. Then we check for a condition if **(maxCount< count)** we will update it and mark as true. Else we will check for the **count==maxCount** and we will check that our res has updated or not by the help of boolean variable. if It is then we simply update res. If boolean variable remains false then we simply find min because it means no of count remains 0 for all the element.\nAnd at last we will check boolean variable value if its true we simply return res else we return min.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(nums.length*divisors.length)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n# Code\n```\nclass Solution {\n    public int maxDivScore(int[] nums, int[] divisors) {\n        \n  \t\tint maxCount = 0, res = 0,min=Integer.MAX_VALUE;\n\t\tboolean isGreater=false;\n\n\t\tfor (int i = 0; i < divisors.length; i++) {\n\t\t\tint count = 0 ;\n\t\t\t//res = div[i];\n\n\t\t\tfor (int j = 0; j < nums.length; j++) {\n\t\t\t\tif (nums[j] % divisors[i] == 0) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (maxCount < count) {\n\t\t\t\tmaxCount = count;\n\t\t\t\tres = divisors[i];\n\t\t\t\tisGreater=true;\n\t\t\t}\n            if(maxCount == count) {\n\t\t\t\tif(res > divisors[i] && isGreater) {\n\t\t\t\t\tres = divisors[i];\n\t\t\t\t}\n\t\t\t\tif(min>divisors[i]) {\n\t\t\t\t\tmin=divisors[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn (isGreater)?res:min;\n    }\n}\n```
['Java']