2644. Find the Maximum Divisibility Score, Time complexity: O(N*D), Space complexity: O(1)
IntuitionApproachComplexity
Time complexity: O(N*D)

Space complexity: O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(N*D)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def maxDivScore(self, nums, divisors):
        max_divisibility_score = None
        max_divisibility_score_divisor = None
        
        for i, d in enumerate(divisors):
            divisibility_score = 0
            for n in nums:
                if (n % d == 0):
                    divisibility_score += 1
            
            if (max_divisibility_score is None or divisibility_score >= max_divisibility_score):
                max_divisibility_score_divisor = min(max_divisibility_score_divisor, d) if divisibility_score == max_divisibility_score else d
                max_divisibility_score = divisibility_score

        return max_divisibility_score_divisor
```
['Python3']