시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 107 24 17 19.318%

문제

기말고사를 대비해서 수학을 예습하던 상근이는 놀라운 식을 발견했다. 바로 A=S이다. A=S가 놀라운 이유는 A와 S가 같지 않기 때문이다.

상근이는 A와 S가 서로 다른데 왜 A=S인지 궁금해 하다가 바로 밑에 쓰여 있는 이유를 발견했다.

좌변에 있는 숫자 A에 적절히 +기호를 삽입하여 식이 같아 지도록 만들면 된다는 것이었다.

예를 들어, 143175=120인 경우에 14+31+75=120을 만들면, A=S가 성립한다는 것을 알 수 있다.

A=S가 주어졌을 때, +를 적절히 삽입하여 등호가 성립하게 바꾸는 프로그램을 작성하시오.

입력

첫째 줄에 등식 A=S가 주어진다. A와S는 0으로 시작하지 않는 양의 정수이다. A의 길이는 최대 1,000자리이고, S는 5,000보다 작거나 같다.

출력

첫째 줄에 입력으로 주어진 A=S에 +를 적절히 삽입하여 등식이 성립하도록 바꾼 식을 출력한다. 만약 그러한 경우가 여러개일 경우에는 +를 적게 넣는 식을 출력한다. +를 적게 넣는 식이 여러 가지 존재한다면 아무거나 출력하면 된다. 항상 등식이 성립하게 바꿀 수 있는 입력만 주어진다.

예제 입력 1

143175=120

예제 출력 1

14+31+75=120
W3sicHJvYmxlbV9pZCI6IjI5NzgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJBPVMiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YWUzMFx1YjlkMFx1YWNlMFx1YzBhY1x1Yjk3YyBcdWIzMDBcdWJlNDRcdWQ1NzRcdWMxMWMgXHVjMjE4XHVkNTU5XHVjNzQ0IFx1YzYwOFx1YzJiNVx1ZDU1OFx1YjM1OCBcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHViMTgwXHViNzdjXHVjNmI0IFx1YzJkZFx1Yzc0NCBcdWJjMWNcdWFjYWNcdWQ1ODhcdWIyZTQuIFx1YmMxNFx1Yjg1YyBBPVNcdWM3NzRcdWIyZTQuI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