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

11470번 - Easy Arithmetic 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB202605036.496%

문제

Eva is a third-grade elementary school student. She has just learned how to perform addition and subtraction of arbitrary-precision integers. Her homework is to evaluate some expressions. It is boring, so she decided to add a little trick to the homework. Eva wants to add some plus and minus signs to the expression to make its value as large as possible.

입력

The single line of the input file contains the original arithmetic expression. It contains only digits, plus (‘+’) and minus (‘-’) signs.

The original expression is correct, that is:

  • numbers have no leading zeroes;
  • there are no two consecutive signs;
  • the last character of the expression is a digit.

The length of the original expression does not exceed 1000 characters.

출력

Output a single line — the original expression with some plus and minus signs added. Output expression must satisfy the same correctness constraints as the original one. Its value must be as large as possible.

제한

예제 입력 1

10+20-30

예제 출력 1

10+20-3+0

예제 입력 2

-3-4-1

예제 출력 2

-3-4-1

예제 입력 3

+10

예제 출력 3

+10

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > NEERC Northern Subregional 2015 E번

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

출처

대학교 대회

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

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