1 solutions

  • 0
    @ 2025-9-7 11:05:46
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int n,k;
    	cin>>n>>k;
    		while(k>0){
    			int g=n%10;
    			if(g>0){
    				n-=1;
    			}else if(g==0){
    				n/=10;
    			}
    			k--;
    		}
    	cout<<n;
    	return 0;
    }
    

    Information

    ID
    2837
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    25
    Accepted
    16
    Uploaded By