My code giving different answer for A = [ 96, 96, 7, 81, 2, 13 ]


#1

class Solution:
# @param A : tuple of integers
# @return an integer
def hammingDistance(self, A):
ans = 0
for i in range(len(A)):
for j in range(i+1,len(A)):
ans += len(bin(A[i]^A[j])[2:].strip(‘0’))
return 2*ans % 1000000007