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

建议使用的浏览器:

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

3932:Matches

题目描述
Zidane is a weird arithmetic expert. Unlike other mathematician, he loves using matches to represent numbers as illustrated in Fig.1.



Fig.1


One day Zidane “wrote”an equation on his desk and then went out. The equation was in “A + B = C” format. A, B, and C were numbers made up by matches. “+” and “=” were wrote in ink.

When Zidane came back after a lecture, he found out that somebody must have touched the equation and the equation became wrong! After promised a new toy, Zidane's son confessed that he had broken in the room and moved ONE match (not removed, that match was still in the equation). Given the wrong equation on his desk, can you help Zidane find the original one?

Note: Both the wrong and original equations may have numbers with leading zeros. And it is guaranteed that only ONE possible original equation exists.
输入解释
The input consists of several test cases. Each test case is a single line representing a wrong equation. Each wrong equation is in the format of “A + B = C” (A, B and C are all numbers), and consists of no more than 100000 characters.
输出解释
Output the original equation in a single line followed by 17 “*” for each test case.
输入样例
0 + 7 = 9
9 + 80 = 8
输出样例
8 + 1 = 9
*****************
8 + 00 = 8
*****************
提示
Note: Numbers and operators(“+”, “=”) must be separated by a blank, no mater in the input or in the output.

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3932

最后修改于 2020-10-29T07:15:55+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
5000 65536