| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB | 703 | 457 | 415 | 69.052% |
Ingrid is the founder of a company that sells bicycle parts. She used to set the prices of products quite arbitrarily, but now she has decided that it would be more profitable if the prices end in 99ドル$.
You are given a positive integer $N,ドル the price of a product. Your task is to find the nearest positive integer to $N$ which ends in 99ドル$. If there are two such numbers that are equally close, find the bigger one.
The input contains one integer $N$ (1ドル \leq N \leq 10^4$), the price of a product. It is guaranteed that the number $N$ does not end in 99ドル$.
Print one integer, the closest positive integer that ends in 99ドル$. In case of a tie, print the bigger one.
10
99
249
299
10000
9999
Contest > KTH Challenge > KTH Challenge 2022 C번