All submissions for this problem are available.
Darian has a very poor memory. He can never remember any password he sets for his laptop which gets him into a lot of trouble. But the one thing he had, to save him was that he was good with numbers. He could calculate anything but then again he had a problem remembering a string of numbers. So he devised a way of not remembering a password but at the same time keeping his laptop secure. By this method, his password contains 1s and 0s. It does not contain any leading 0. There are no consecutive 1s. This list of numbers would be 1, 10, 100, 101, 1000 and so on. So every time he switched on his computer he would get a different P for which he has to calculate the Pth number in the list.
The first line of the input contains one integer T (1<=T<=100) the number of test cases. Each test case contains one integer P. where 1<=P<=10^9
For each test case output one line containing the pth number in the list.
Input: 2 10 30 Output: 10010 1010001
Note : This problem has been taken from previously solved questions.
|Time Limit:||1 - 3 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions