#P1755. 斐波那契的拆分

斐波那契的拆分

Description

It is known that any positive integer can be decomposed into several Fibonacci numbers. Now, you are asked to find a decomposition of nn.

Input Format

The first line contains an integer tt, the number of test cases.

Then follow tt lines, each containing an integer nn (as described).

Output Format

Output tt lines. Each line contains a string representing a decomposition in the format n=a1+a2+a3++akn = a_1 + a_2 + a_3 + \ldots + a_k, and the summands must be listed from small to large.

1
1

1=1
1
10
10=2+8

Hint

If there are multiple valid decompositions, choose the one with the fewest summands. If there is still more than one, output the one whose rightmost summands are as large as possible.

For 100%100\% of the testdata, t1000t \leq 1000, 1n1091 \leq n \leq 10^{9}.

Translated by ChatGPT 5