Killjee and easy problem

2.3

3 votes
Mathematics, Modular arithmetic, Easy
Problem

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 Ni=1(bii). where, bi is number of set bits of ai.

Find and print the answer Modulo (1010+11)

INPUT CONSTRAINTS

  • 1N105
  • 1ai109

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.

Sample Input
3
1 2 4
Sample Output
3
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

b[1]=1,b[2]=1 and b[3]=1 so, summation of b[i]i = 1+1+1=3.

Contributers:
Editor Image

?