- Dejected Birthday-盗窃
- 2017-02-16 19:49:31 @
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cstring>
#include <vector>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <iomanip>
using namespace std;
int main() {
//freopen("//xx.in","r",stdin);
//freopen("//xx.out","w",stdout);
string n;
getline(cin,n);
int s;
cin>>s;
int len=n.size();
bool flag=false;
for (int i=1;i<=s;i++)
{
for (int j=0;j<len-1;j++)
if (n[j]>n[j+1])
{
for (int k=j;k<len-1;k++)
{
n[k]=n[k+1];
}
break;
}
len--;
}
for (int i=0;i<=len-1;i++)
{
if (n[i]!='0') flag=true;
if (flag) cout<<n[i];
}
//fclose(stdin);
//fclose(stdout);
//while (1);
return 0;
}
0 条评论
目前还没有评论...