ans

wyz2011 2023-11-25 16:06:55 6 返回题目

#include<bits/stdc++.h>
using namespace std;
int n,k,a[260],rest,t=1,minn,cnt=0;
bool flag=0;
string s;
int main(){
	cin>>s>>k;
	for(int i=1;i<=k;i++){
		int j=0;
		while(j+1<s.size()&&s[j]<=s[j+1]) j++;
		s.erase(j,1);
	}
	while(s.size()>1&&s[0]=='0') s.erase(0,1);
	cout<<s;
	return 0;
}
{{ vote && vote.total.up }}