CF58E.Expression

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

One day Vasya was solving arithmetical problems. He wrote down an expression a+b=ca+b=c in his notebook. When the teacher checked Vasya's work it turned out that Vasya had solved the problem incorrectly. Now Vasya tries to find excuses. He says that he simply forgot to write down several digits in numbers aa , bb and cc , but he can't remember what numbers they actually were. Help Vasya, find such numbers xx , yy and zz , with which the following conditions are met:

  • x+y=zx+y=z ,
  • from the expression x+y=zx+y=z several digits can be erased in such a way that the result will be a+b=ca+b=c ,
  • the expression x+y=zx+y=z should have the minimal length.

输入格式

The first and only input line contains the expression a+b=ca+b=c ( 1<=a,b,c<=1061<=a,b,c<=10^{6} , aa , bb and cc don't contain leading zeroes) which is the expression Vasya wrote down.

输出格式

Print the correct expression x+y=zx+y=z ( xx , yy and zz are non-negative numbers without leading zeroes). The expression a+b=ca+b=c must be met in x+y=zx+y=z as a subsequence. The printed solution should have the minimal possible number of characters. If there are several such solutions, you can print any of them.

输入输出样例

  • 输入#1

    2+4=5
    

    输出#1

    21+4=25
    
  • 输入#2

    1+1=3
    

    输出#2

    1+31=32
    
  • 输入#3

    1+1=2
    

    输出#3

    1+1=2
    
首页