title: Find Number of pairs (a, b) in an array such that a % b = 0
body: <p>I am getting the solution in O(N^2)
  here is my solution:</p>
  
  <pre><code>arr = [4,6,5,5,7,7,8]
  
  count = 0
  
  for i in range(n):
  
      for j in range(n):
          if (i!=j and arr[i]%arr[j]==0):
              count = count + 1
  return count
  </code></pre>