Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
34420 sunhuifeng 最小新整数 C++ 运行出错 2 MS 320 KB 435 2023-12-21 21:09:36

Tests(0/1):


#include<iostream> #include<cstring> using namespace std; string s; int n; int main(){ cin>>s>>n; while(n){ int i=0; for(i=0;i<s.size()-1;i++){ if(s[i]>s[i+1]){ s.erase(i,1); n--; break; } } if(i==s.size()-1)break; } while(n--)s.erase(s.size()-1,1); int pos=0; while(s[pos]=='0'&&pos<s.size()-1){ pos++; } for(int i=pos;i<=s.size()-1;i++){ cout<<s[i]; } return 0; }


测评信息:

输入

2
9128456 2
1444 3

输出

                    

答案

123456
1

检查日志

terminate called after throwing an instance of '

系统信息

exit code: 0, checker exit code: 0