P15423 [CodeChef] SUBTRACT
普及
题目描述

Ayush is learning how to decrease a number by one, but he does it wrong with a number consisting of two or more digits. Ayush subtracts one from a number by the following algorithm:
if the last digit of the number is non-zero, he decreases the number by one.
if the last digit of the number is zero, he divides the number by 10.
You are given an integer number n
Ayush will subtract one from it k times. Your task is to print the result after all k subtractions.
It is guaranteed that the result will be a positive integer number.
Input
The first line of the input contains two integers n and k (2 ≤ n ≤ 10^9, 1 ≤ k ≤ 50) -- the number from which Ayush will subtract and the number of subtractions respectively.
Output
Print one integer number — the result of the decreasing n by one k times.
It is guaranteed that the result will be a positive integer number.
EXAMPLE
Sample Input 1
512 4
Sample Output 1
50
Sample Input 2
1000000000 9
Sample Output 2
1

输入格式

见题面

输出格式

见题面

样例输入
['512 4']
样例输出
['50']