아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Noonerized Spumbers

시간 제한1초메모리 제한1024 MB

요약
거짓인 식 x op y = z가 주어질 때, 세 수 중 두 수의 진접두사를 서로 바꾸어 참인 식을 만든다.
난이도

보통10점 중 4점

유형
완전 탐색, 문자열, 구현
정답자
아직 제출이 없습니다

문제

Everyone has heard of spoonerisms, named after William Archibald Spooner, an Oxford professor who had a habit of swapping prefixes of words, often with comical results. "May I show you to your seat?" became "May I sew you to your sheet?" and "a crushing blow" became "a blushing crow."

Just imagine him as a student of arithmetic, occasionally swapping the prefixes of the numbers he was calculating with and then wondering why his equations never made any sense. For instance, when he writes:

what he really intended to write was:

(He swapped prefixes "99" and "669669" in the first and third numbers.) And when he writes:

what he really intended to write was:

(He swapped the prefix "7272" with the prefix "6868" in the first and second numbers.)

Grading homework from young Mr. Spooner is quite a challenge. Fleas pined a way to help!

입력

The input consists of a single line containing an expression of the form "x+y=zx + y = z" or "x\*y=zx \* y = z", where xx, yy, and zz are positive integers less than 2312^{31}. There will be single spaces surrounding the "++" and "\*\*" operators and the "==" sign. The expression will not be a mathematically correct equation.

출력

Output a mathematically correct equation consisting of the input line modified by swapping proper prefixes of two of the three numbers xx, yy, zz. (A proper prefix of a string ss is a prefix that is neither empty nor equal to ss.) Separate the numbers, operators, and the "==" sign with single spaces. All integers in the correct equation will be non-negative and less than 2312^{31}. There is guaranteed to be only one possible correct equation that can be formed by swapping proper prefixes.

예제2

  1. 예제 1

    입력
    92 + 2803 = 669495
    
    예상 출력
    6692 + 2803 = 9495
    
  2. 예제 2

    입력
    6891 * 723 = 4979753
    
    예상 출력
    7291 * 683 = 4979753