题目描述
Problem Background
Adorable Mirko bought a lot of candies from a candy store.
Problem Description
He cannot always pay the exact amount, so he has made an agreement with the shop owner.
He tells the shop owner the smallest denomination of his banknote, and the shop owner rounds his payment to the nearest amount he can afford.
For example, if Mirko's smallest banknote is 100 dollars and he wants to buy 150 dollars' worth of candies, the shop owner rounds his payment to 200 dollars. If he wants to buy 149 dollars' worth of candies, the shop owner rounds his payment to 100 dollars.
Recently, Mirko suspects that the shop owner is trying to cheat him. Please determine if the shop owner is cheating him.
Mirko's mother only gives him banknotes in denominations of 1, 10, 100, 1000, 10000, 100000, ..., 10^9 dollars, and he has an unlimited supply of these banknotes.
Input Format
The first line contains two integers, $c$ and $k$, representing the price of the candies Mirko wants to buy and the number of trailing zeros on Mirko's smallest banknote, where the "number of trailing zeros" refers to the exponent $t$ in $10^t$.
Output Format
The first line contains a single integer, the rounded price of the candies to the nearest amount Mirko can pay.
Sample Input and Output
Sample Input #1
184 1
Sample Output #1
180
Sample Input #2
123450995 1
Sample Output #2
123451000
Sample Input #3
182 2
Sample Output #3
200
Notes
Data Size and Constraints
For 100% of the data, $1 \le c \le 10^9$, $0 \le k \le 9$.
Note
Translated from COCI 2009-2010 #3 T2 SLATKISI, full score is 50, each test case is worth 5 points, totaling 10 test cases.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分