Codeforces-SolutionsA/Codes/977 A - Wrong Substraction/977A.cpp

13 lines
175 B
C++
Raw Normal View History

2023-06-08 02:01:28 +08:00
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;
cin>>n>>k;
while(k--)
{
if(n%10==0) n=n/10;
else n=n-1;
}
cout<<n;
}