Assi and Chintu 1

3.5

19 votes
Medium
Problem

For some weird reason Assi and his little brother Chintu felt in love with numbers which are power of 2. But they were very disappointed when their parents gifted them numbers which were not all powers of 2. So they took the number and made a new array with the given numbers raised to the power of 2.

For instance if their parents gave them [ 1 , 2 , 3 ] . They made a new array out of it [ 2 , 4 , 8 ] .

2^1 = 2

2^2 = 4

2^3 = 8

Given an array of numbers representing power of 2 compute the sum of all the numbers. Then print the result in binary form.

Since , 2 + 4 + 8 = 14

The answer is = 1 1 1 0

Constraints:

Input

The first line contains N number of integers.

The next N lines contains N number of integers .

( 1 <= All integers <= 100000 )

Output

The required sum in binary format and give a single space between each character.

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Here,

2^0 + 2^2 = 5

5 in binary form = 1 0 1

Editor Image

?