Topic link: http://codeforces.com/problemset/problem/977/A
Question meaning: This question, the title is to let you play according to his rules. Divide by 10 if the end is 0, not -1.
Solution: The solution is the meaning of the problem.
1 #include<iostream> 2 using namespace std; 3 4 int main(){ 5 int n,k; 6 cin>>n>>k; 7 while(k--){ 8 if(n%10 == 0){ 9 n /= 10; 10 } 11 else{ 12 n-=1; 13 } 14 } 15 cout<<n<<endl; 16 17 return 0; 18 }