算法题之UVA 763 - Fibinary Numbers(高精度斐波那契)2014-04-10Fibinary NumbersThe standard interpretation of the binary number 1010 is 8 + 2 = 10. An alternate way to view the sequence ``1010"" is to use Fibonacci numbers as bases instead of powers of two. For this problem, the terms of the Fibonacci sequence are:

Where each term is the sum of the two preceding terms (note that there is only one 1 in the sequence as defined here). Using this scheme, the sequence ``
1010"" could be interpreted as

. This representation is called a Fibinary number.Note that there is not always a unique Fibinary representation of every number. For example the number 10 could be represented as either 8 + 2 (
10010) or as 5 + 3 + 2 (
1110). To make the Fibinary representations unique, larger Fibonacci terms must always be used whenever possible (i.e. disallow 2 adjacent 1"s). Applying this rule to the number 10, means that 10 would be represented as 8+2 (
10010).Input and OutputWrite a program that takes two valid Fibinary numbers and prints the sum in Fibinary form. These numbers will have at most 100 digits.In case that two or more test cases had to be solved, it must be a blank line between two consecutive, both in input and output files.Sample Input
1001011000010001000010000
Sample Output
10100100000100100