For this Question: Given an array of N integers, your task is to calculate the sum of bit difference in all pairs which can be formed.The first line of input contains a single integer N, the second line of input contains N space separated integers depicting values of the array.

Constraints:-
1 <= N <= 100000
0 <= Arr[i] <= 1000000000Print the sum of bit difference of all possible pairs.

Note:- Since the answer can be quite large print your answer modulo 10<sup>9</sup> + 7Sample Input:-
2
1 3

Sample Output:-
2

Explanation:-
(1, 1) = 0
(1, 3) = 1
(3, 1) = 1
(3, 3) = 0

Sample Input:-
2
1 2

Sample Output:-
4, I have written this Solution Code: def suBD(arr, n):
    ans = 0  # Initialize result
    for i in range(0, 64):
        count = 0
        for j in range(0, n):
            if ( (arr[j] & (1 << i)) ):
                count+= 1
        ans += (count * (n - count)) * 2;
    return (ans)%(10**9+7)
n=int(input())
arr = map(int,input().split())
arr=list(arr)
print(suBD(arr, n)), In this Programming Language: Python, Now tell me if this Code is compilable or not?