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

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

hide comments
2016-02-27 21:44:45
ekdum jhakas!!
2016-01-24 19:18:48
After you get the logic.... use bitset to implement it. AC -> 0.00
2016-01-22 21:52:57
nice question,my 9 th (superb logic linked with convertion into binary numbers) :)
2015-12-13 08:56:30 Siddharth Singh
Solved Manku Word Before It, This Is Way More tricky Than That,
Just Took Me 3 Hours
Fabulous , I Must Say
Best Question I did till Now
PS: My 100th AC , #Proud

Last edit: 2015-12-13 08:56:44
2015-12-05 22:32:14
easy question :D
2015-09-25 21:47:21 ROHIT Kumar
bunch of logic in doing this ..NICE one AC in 1 go :P
2015-09-25 16:13:48 rahul_verma
nice problem...........AC in 1st go!!!!!!!
try this
http://www.spoj.com/problems/ITRIX_B/

Last edit: 2015-09-25 16:17:44
2015-09-22 21:38:26
Loved solving this question... AC in one go :)
2015-09-21 13:56:23
it is easy one.
2015-09-03 06:21:30 dhumketu
A BIT of logic :P !!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.