P29420 [洛谷] [CRCI2007-2008] JEDNAKOST
提高-
题目描述

Problem Description

Given a string in the form of A=B, where both $A$ and $B$ are positive integers without leading zeros. Insert the minimum number of plus signs between adjacent digits of $A$ such that the equation holds true.

After adding the plus signs to $A$, each summand is allowed to have multiple leading zeros, including zeros. This means summands like $000\ldots$ are permitted.

The data guarantees that there is a solution.

Input Format

The input consists of a single line containing a string in the form of A=B, representing the given equation.

Output Format

This problem includes a Special Judge.

Output a single line containing the string representing the equation with the plus signs added, ensuring the equation is true.

Sample Input and Output

Sample Input #1

143175=120

Sample Output #1

14+31+75=120

Sample Input #2

5025=30

Sample Output #2

5+025=30

Sample Input #3

999899=125

Sample Output #3

9+9+9+89+9=125

Notes

Data Size and Constraints

For all test cases, it is guaranteed that $1 \leq A < 10^{1000}$, $1 \leq B \leq 5 \times 10^3$, and $A \neq B$.

Source

Translated from COCI2007-2008 Regional Competition T4 JEDNAKOST.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
143175=120
样例输出
14+31+75=120