Slatkisi
의견: 0
Mirko buys a lot of candy in the candy shop. He cannot always pay the exact amount so the shopkeeper and he have an agreement. He tells the shopkeeper the smallest bill he has, and she rounds his amount to the nearest number he can pay. For example, if the smallest bill Mirko has is a hundred bill, and he wants to buy \(150\) Kunas of candy, the shopkeeper rounds his amount to \(200\) Kunas. If he wants to buy \(149\) Kunas of candy, the shopkeeper rounds his amount to \(100\) Kunas.
Lately, Mirko suspects the shopkeeper is trying to cheat him. He asked you to help him. Write a program that will help him.
His mother only gives Mirko \(1, 10, 100, 1\,000, \ldots, 1\,000\,000\,000\) Kuna bills. He never has bills that are not powers of \(10\). The bills he does have, he has in large amounts.
The first and only line of input contains two integers, \(C\) (\(0 \le C \le 1\,000\,000\,000\)), the price of candy Mirko is going to buy, and \(K\) (\(0 \le K \le 9\)), number of zeros on the smallest bill Mirko has.
The first and only line of output should contain one integer, \(C\) rounded to the nearest amount Mirko can pay.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Test 1 | 10점 | None |
Test 2 | 10점 | None |
Test 3 | 10점 | None |
Test 4 | 10점 | None |
Test 5 | 10점 | None |
Test 6 | 10점 | None |
Test 7 | 10점 | None |
Test 8 | 10점 | None |
Test 9 | 10점 | None |
Test 10 | 10점 | None |
184 1180123450995 1123451000182 2200평가 및 의견
Slatkisi
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Slatkisi