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

23731번 - Physics Experiment 다국어

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

문제

Yunee is taking a physics lab class. One day, after an experiment, Yunee noticed that some figures in the experiment result came out lower than expected. So Yunee decided to manipulate the result by rounding the values several times.

When rounding a number to the $i$-th place, it is rounded down if the digit one place right to the $i$-th place is less than 5ドル$. Otherwise, it is rounded up. For example, rounding 454ドル$ to the nearest tens gives 450ドル$. On the other hand, rounding 454ドル$ to the nearest hundreds gives 500ドル$.

By rounding 454ドル$ to the nearest hundreds and then thousands, we get 454ドル \rightarrow 500 \rightarrow 1000$. This is the maximum value we can get by rounding 454ドル$ zero or more times.

Help Yunee maximize the value in the experiment result by rounding it zero or more times.

입력

The first line contains an integer $N$ representing the value in the experiment result $(1\le N \le 10^{15})$. Note that $N$ may exceed the 32-bit integer limit.

출력

Output the maximized value by rounding $N$ zero or more times. The output should not have leading zeros.

제한

예제 입력 1

454

예제 출력 1

1000

예제 입력 2

4445

예제 출력 2

10000

예제 입력 3

1234321

예제 출력 3

1234321

힌트

출처

University > UNIST > 3rd UNIST Algorithm Programming Contest Uni-CODE 2021 B번

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

출처

대학교 대회

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

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