2 人解决,11 人已尝试。
2 份提交通过,共有 20 份提交。
9.7 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
The group of Absurd Calculation Maniacs has discovered a great new way how to count. Instead of using the ordinary decadic numbers, they use Fibonacci base numbers. Numbers in this base are expressed as sequences of zeros and ones similarly to the binary numbers, but the weights of bits (fits?) in the representation are not powers of two, but the elements of the Fibonacci progression (
For example
You may observe that every integer can be expressed in this base, but not necessarily in a unique way - for example
To prove that this representation of numbers is superior to the others, ACM have decided to create a computer that will compute in Fibonacci base. Your task is to create a program that takes two numbers in Fibonacci base (not necessarily in the canonical representation) and adds them together.
The input consists of several instances, each of them consisting of a single line. Each line of the input contains two numbers
The output for each instance should be formated as follows:
The first line contains the number
11101 1101 1 1
100101 + 10001 ------- 1001000 1 + 1 -- 10
2 人解决,11 人已尝试。
2 份提交通过,共有 20 份提交。
9.7 EMB 奖励。