| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 46731 | 老方 | 删除数字 | C++ | Accepted | 0 MS | 244 KB | 323 | 2024-05-05 10:46:15 |
#include<bits/stdc++.h> using namespace std; int main(){ int qwertyuiopasdfghjklzxcvbnm,n; cin>>qwertyuiopasdfghjklzxcvbnm>>n; string s=to_string(qwertyuiopasdfghjklzxcvbnm); while(n--){ for(int i=0;i<s.size()-1;i++){ if(s[i]<s[i+1]){ s.erase(i,1); break; } } } cout<<s; return 0; }