#d2855. 异或和
异或和
Sum of XORs
Problem Description
You are given an array of length . Compute the value of the following expression modulo :
$$\sum_{i=1}^{n-1} \sum_{j=i+1}^{n} (a_i \; \mathrm{XOR} \; a_j)$$Input Format
The first line contains an integer .
The next line contains integers .
Output Format
Output one integer: the answer.
Sample Input
3
1 2 3
Sample Output
6
Constraints
, .