Given an array A[] of N numbers. Now, you need to find and print the Summation of the bitwise OR of all possible subsets of this array.
As answer can be large, print it Modulo \(10^9+7\)
Input:
The first line contains a single integer T denoting the number of test cases in a single test file.
The first line of each test case contains a number N denoting the number of elements in the given array.
The second line contains the N elements of the array.
Output:
For each test case output a single number denoting the Summation of bitwise OR of all possible subsets of the given array.
Input Constraints:
\(1 \le T \le 10 \\ 1 \le N \le 10^5 \\ 1 \le A[i] \le 10^9\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial