Logo
(追記) (追記ここまで)

24561번 - Noonerized Spumbers 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB50322965.909%

문제

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 "9ドル$" and "669ドル$" in the first and third numbers.) And when he writes:

what he really intended to write was:

(He swapped the prefix "72ドル$" with the prefix "68ドル$" 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 = z$" or "$x * y = z$", where $x,ドル $y,ドル and $z$ are positive integers less than 2ドル^{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 $x,ドル $y,ドル $z$. (A proper prefix of a string $s$ is a prefix that is neither empty nor equal to $s$.) Separate the numbers, operators, and the "$=$" sign with single spaces. All integers in the correct equation will be non-negative and less than 2ドル^{31}$. There is guaranteed to be only one possible correct equation that can be formed by swapping proper prefixes.

제한

예제 입력 1

92 +たす 2803 = 669495

예제 출력 1

6692 +たす 2803 = 9495

예제 입력 2

6891 * 723 = 4979753

예제 출력 2

7291 * 683 = 4979753

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2021 East Central Regional Contest G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /