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-09-15 17:58:15
try to get logic in string+recursion
2016-08-26 09:26:11
AC in one go and my 25th. :)
2016-08-15 19:10:27
AC in one go! 0.00 :) pure math
2016-08-07 15:38:51
m stuck here in this...help someone please
preferably tell how to do by p&c
2016-08-06 21:46:37
easy tricky question ac in one go! feeling happy!!!
2016-07-31 06:21:51
binary as well as p&c both logics can be applied..... used p&c AC in 0.00


Last edit: 2016-07-31 06:30:20
2016-07-26 23:23:21
Love to recycle code.
2016-06-25 15:33:39
loved solving it
AC in one go :)
2016-06-06 18:48:07
really amusing!... AC in one go! :)
2016-03-07 08:11:54
Nice. One line in python. I love python. <3
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.