시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 59 17 10 21.739%

문제

기말고사를 대비해서 수학을 예습하던 상근이는 놀라운 식을 발견했다. 바로 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
W3sicHJvYmxlbV9pZCI6IjI5NzgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJBPVMiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YWUzMFx1YjlkMFx1YWNlMFx1YzBhY1x1Yjk3YyBcdWIzMDBcdWJlNDRcdWQ1NzRcdWMxMWMgXHVjMjE4XHVkNTU5XHVjNzQ0IFx1YzYwOFx1YzJiNVx1ZDU1OFx1YjM1OCBcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHViMTgwXHViNzdjXHVjNmI0IFx1YzJkZFx1Yzc0NCBcdWJjMWNcdWFjYWNcdWQ1ODhcdWIyZTQuIFx1YmMxNFx1Yjg1YyBBPVNcdWM3NzRcdWIyZTQuIEE9U1x1YWMwMCBcdWIxODBcdWI3N2NcdWM2Y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