Untitled

public
yousefkarem91 Sep 18, 2024 Never 54
Clone
C++ paste1.cpp 13 lines (13 loc) | 211 Bytes
1
#include <iostream>
2
using namespace std;
3
int main()
4
{
5
int n,k;cin>>n>>k;
6
for(int i=0;i<k;i++) {
7
if(n%10==0)
8
n/=10;
9
else
10
n--;
11
}
12
cout<<n<<'\n';
13
}