Solution to the problem number 977A of Codeforces - 977A.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
using namespace std;

int main() {
    long long int a,b; cin>>a>>b;
    while(b--)
    {
        if(a%10!=0) a-=1;
        else a/=10;
    }
    cout<<a<<endl;
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!