【poj】里的智力题

Matches

Time Limit: 5000MS Memory Limit: 65536K
Total Submissions: 183 Accepted: 19

Description

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.

Input

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

Output the original equation in a single line followed by 17 “*” for each test case. 

Sample Input

0 + 7 = 9
9 + 80 = 8

Sample Output

8 + 1 = 9
*****************
8 + 00 = 8
*****************


待续











  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值