Killjee is solving an easy problem. Given an array a containing N positive integers. You need to find the magic value of the array.
Magic value of an array is \(\sum_{i=1}^{N}( {b_i}^i ) \). where, \(b_i\) is number of set bits of \(a_i\).
Find and print the answer Modulo \((10^{10}+11) \)
INPUT CONSTRAINTS
- \(1 \le N \le 10^5\)
- \(1 \le a_i \le 10^9\)
INPUT FORMAT
First line of input contains a single integer N. Next line contains N space separated integers, elements of array a.
OUTPUT FORMAT
Output a single integer, magic value of the array.
3 1 2 4
3
\( b[1]=1,b[2]=1\) and \( b[3]=1 \) so, summation of \( b[i]^{i} \) = \(1+1+1=3 \).
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
No editorial available for this problem.
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