1260. Pairs of integers

单点时限: 2.0 sec

内存限制: 256 MB

You are to find all pairs of integers such that their sum is equal to the given integer number N and the second number results from the first one by striking out one of its digits. The first integer always has at least two digits and starts with a non-zero digit. The second integer always has one digit less than the first integer and may start with a zero digit.

输入格式

The input file consists of a single integer N (10 ≤ N ≤ 10^9).

输出格式

On the first line of the output file write the total number of different pairs of integers that satisfy the problem statement. On the following lines write all those pairs. Write one pair on a line in ascending order of the first integer in the pair. Each pair must be written in the following format:

X + Y = N

Here X, Y, and N, must be replaced with the corresponding integer numbers. There should be exactly one space on both sides of ‘+’ and ‘=’ characters.

样例

Input
302
Output
5
251 + 51 = 302
275 + 27 = 302
276 + 26 = 302
281 + 21 = 302
301 + 01 = 302

2 人解决,4 人已尝试。

2 份提交通过,共有 4 份提交。

8.9 EMB 奖励。

创建: 17 年,6 月前.

修改: 7 年,3 月前.

最后提交: 1 年,5 月前.

来源: NEERC

题目标签