input: Write a python function to calculate the sum of the XOR of all pairs of elements in a given array.
  assert pair_XOR_Sum([5,9,7,6],4) == 47
  assert pair_XOR_Sum([7,3,5],3) == 12
  assert pair_XOR_Sum([7,3],2) == 4
output: def pair_XOR_Sum(arr, n):
      xor_sum = 0
      for i in range(n):
          for j in range(i + 1, n):
              xor_sum += arr[i] ^ arr[j]
      return xor_sum