当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1554:Pairs of integers

题目描述
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 several test cases.

Each test case contains single integer N (10 ≤ N ≤ 10^9), as decribed above
输出解释
The output consists of several blocks, one for each test case.

On the first line of a block 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.
输入样例
302
输出样例
5
251 + 51 = 302
275 + 27 = 302
276 + 26 = 302
281 + 21 = 302
301 + 01 = 302
来自杭电HDUOJ的附加信息
Recommend LL

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1554

最后修改于 2020-10-25T22:45:58+00:00 由爬虫自动更新

共提交 754

通过率 66.71%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)