#958
Bronze III
SLATKISI
시간 제한
1s
메모리 제한
32MB
제출
1
정답
1
맞힌 사람
1
정답 비율
100.0%

문제

Author: Leo Osvald Mirko buys a lot of candy in the candy shop. He cannot always pay the exact ammount so the shopkeeper and he have an agreement. He tells the shopkeeper the smallest bill he has, and she rounds his ammount 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 ammount to 200 Kunas. If he wants to buy 149 Kunas of candy, the shopkeeper rounds his ammount to 100 Kunas. Lately, Mirko suspects the shoopkeeper 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, ... , 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 ammounts.

입력

The first and only line of input contains two integers, C (0 ≤ C ≤ 1 000 000 000), the price of candy Mirko is going to buy, and K (0 ≤ K ≤ 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.

예제 입력 1

184 1

예제 출력 1

180

예제 입력 2

123450995 1

예제 출력 2

123451000

예제 입력 3

182 2

예제 출력 3

200
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
#순위사용자언어시간메모리코드 길이
5704🥇
안우진
Python7ms8400KB48B
난이도 투표
Bronze III1명 투표· 약 1개월 전
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
#사용자문제결과언어시간메모리코드 길이제출 시간
5704
맞았습니다
Python7ms8400KB48B2026. 04. 29. 15:12