Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
133632 | 黄恩宁 | 删数问题 | C++ | 通过 | 100 | 0 MS | 252 KB | 309 | 2024-03-02 08:46:38 |
#include<iostream> #include<cstdio> using namespace std; int main() { string s; int n,i,j; cin>>s>>n; for(i=1;i<=n;i++) { string tmp=s; s.erase(0,1); for(j=1;j<tmp.size();j++) { string tmpp=tmp; tmpp.erase(j,1); if(s>tmpp) s=tmpp; } } cout<<s<<endl; return 0; }