TSHOW1 - Amusing numbers


Amusing numbers are numbers consisting only of digits 5 and 6. Given an integer k , display the k-th amusing number.

Input

FIrst line consists of integer N representing number of test cases

Next N lines consist of N integers (1 <= k <= 10^15)

Output

N lines each displaying corresponding k-th amusing number

Example

Input:
2
1
5

Output:
5
65

hide comments
nilabja16180: 2017-03-20 09:23:23

AC in one GO! 0.00 sec, bit manipulation is the key!

vunnamtej: 2017-03-09 15:47:19

little math

up79: 2017-03-01 15:43:57

new concept :) yipee AC in one go :)

vanvinhbk94: 2017-02-23 15:40:00

AC in one go :))

sudeep_11: 2017-01-24 15:18:02

AC in one go ! easy one if you get the logic !

herkeyrefugee: 2017-01-05 15:49:13

be careful with the input all inputs are taken before the outputting the answer to previous cases

aditya_rev: 2016-11-03 19:16:43

one click to turn on the green light :)

rajeev_899: 2016-10-15 21:49:41

NICE ONE...AC in one go .....Enjoyed Solving it....really amusing ...

sultania23: 2016-10-15 21:44:20

AC in one go....use binary representation in tricky way.
NICE ONE ....

suvro_datta: 2016-09-15 17:58:15

try to get logic in string+recursion


Added by:Pandian
Date:2012-04-10
Time limit:0.357s-0.714s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:AOL code contest