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
The first line consists of integer N representing number of test cases.
Next N lines consist of N integers (1 ≤ k ≤ 1015).
Output
N lines each displaying corresponding k-th amusing number.
Example
Input: 2 1 5 Output: 5 65
hide comments
|
kailash:
2015-03-29 09:12:03
good problem |
|
[Mayank Pratap]:
2015-03-20 08:55:12
Loved this...After this solve MAY99_2...Loving Spoj... |
|
swordfish12:
2015-03-01 07:31:18
awesome fun solving this :) |
|
Arnabjyoti Kalita:
2015-02-21 06:35:59
Nice... |
|
Vikrant Singh:
2015-01-29 11:56:19
enjoyed solving this !! |
|
Arpit Gupta:
2014-12-22 18:56:33
nice question...:)
|
|
Sahil Dua:
2014-11-06 13:09:15
3rd best timing in PYTH2.7 | 0.04s AC
|
|
CHANDAN KUMAR:
2014-11-02 10:09:29
piyush here digit can contain only 5 and 6 and you have to make no using 5 and in sorted order for example first no is 5 second is 6 then 55 56 65 and so on and here rank of 65 is 5 so 65 will be printed in case of 5 |
|
Mansi Mittal:
2014-07-04 20:23:29
Awesome... Food for the Brain!!! |
|
Aragon!!!:
2014-06-23 08:44:14
one of the best ques here.. loved solving this :) |
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 |