我的原程序86pts
#include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
int n;
cin >> n;
int k=0;
int l;
for(int i=1;i<=n;i++){
int cur=0;
l=s.length();
for(int j=0;j<l;j++){
while(s[0] == '0') s.erase(0,1);
if(s[j] >= s[j+1]){
s.erase(j,1);
l--;
break;
}
}
}
for(int i=0;i<l;i++){
cout << s[i];
}
return 0;
}
而仅仅是
if(s[j] >= s[j+1])
中的“=”删除,就变为100pts
求大佬解疑。。