Submit | All submissions | Best solutions | Back to list |
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
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
|
||||||||||||
2015-08-08 11:27:30 Aman Verma
@vasayashwanth Why are u posting spoiler, if you want to share some info please write a blog i would be more than happy to read than, may be give the link in comment but dont post comment that spoil the question |
||||||||||||
2015-07-27 15:57:33 Ankit
very easy :) |
||||||||||||
2015-07-11 10:12:15
just see the pattern 5,6,55,56,65,66,555,556,565,566,655.........and binary representation of numbers from 0 like 0,1,01,10,000,001,010,011,100............ |
||||||||||||
2015-07-01 13:38:16 SangKuan
i find two way to got ac. |
||||||||||||
2015-06-23 21:39:43
nice one |
||||||||||||
2015-06-11 18:33:31 sh
Initially used the logarithm method ,then realised that there is a simple +1 method. |
||||||||||||
2015-05-26 16:37:01 Parth
good!! |
||||||||||||
2015-05-24 16:16:50 NEXES
good one!!!!!!! |
||||||||||||
2015-05-23 06:19:48 Satyam Mishra
what a problem !!! Amused after solving amusing numbers. :D |
||||||||||||
2015-04-03 08:36:19 Dhruv k14
manku word !!! :) |