시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 67 18 11 20.370%

문제

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