提交时间:2023-11-05 13:19:42

运行 ID: 109019

#include<bits/stdc++.h> using namespace std; string s; int n; int len; int bl1,bl2; int main(){ cin >> s >> n; len = s.size(); for(int i = 0;i < n;i++){ for(int j = 0;j < len;j++){//sb_bug if(s[j] > s[j+1]){ for( int k = j;k < len;k++){ s[k] = s[k+1]; } len--; break; } } } while(s[bl1] == '0' && bl2 < len - 1){ bl1++; bl2++; } //for(int i = bl2;i < len;i++){ //cout << s[i]; //} sb_2bug cout << s; return 0; }