D. Numbers in Negative Base

0

0 votes
Bit manipulation, Easy
Problem

Kirti has got a special task for you. She will give you T numbers and you have to output their representation in base 2, each on a new line.

 

INPUT

First line contains a number T, i.e. number of test cases.

Next T lines contains a integer NN is in decimal format.

 

OUTPUT

Print T lines, each containing the equivalent representation of ith number in base 2.

 

CONSTRAINTS

T105

|N|109 i.e absolute value of N

 

Note : This is a golf question. If your program produces all output correctly, then the score you'll get is determined by the number of non-whitespace characters used in your code. The lower the count of characters, higher will be your score.

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

For 1st number i.e 12

(2)4+(2)3+(2)2=168+4=12

12=(11100)2

 

 

Editor Image

?