Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
78 views1 page

Fi-Binary Number: Input

The document describes Fi-binary numbers, which are binary numbers that cannot have leading zeros or consecutive ones. It provides examples of the first few Fi-binary numbers and states the problem of calculating the n-th Fi-binary number given an integer n as input. The input will be the number of test cases T followed by integers n, and the output should be the n-th Fi-binary number for each test case.

Uploaded by

Hello mister
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views1 page

Fi-Binary Number: Input

The document describes Fi-binary numbers, which are binary numbers that cannot have leading zeros or consecutive ones. It provides examples of the first few Fi-binary numbers and states the problem of calculating the n-th Fi-binary number given an integer n as input. The input will be the number of test cases T followed by integers n, and the output should be the n-th Fi-binary number for each test case.

Uploaded by

Hello mister
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

11089 Fi-binary Number

A Fi-binary number is a number that contains only 0 and 1. It does not contain any leading 0. And
also it does not contain 2 consecutive 1. The first few such number are 1, 10, 100, 101, 1000, 1001,
1010, 10000, 10001, 10010, 10100, 10101 and so on. You are given n. You have to calculate the n-th
Fi-Binary number.

Input
The first line of the input contains one integer T the number of test cases. Each test case contains one
integer n.

Output
For each test case output one line containing the n-th Fi-Binary number.
Constraints

• 1 ≤ N ≤ 109

Sample Input
4
10
20
30
40

Sample Output
10010
101010
1010001
10001001

You might also like