Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
133623 | 吴晨曦 | 删数问题 | C++ | 通过 | 100 | 0 MS | 244 KB | 340 | 2024-03-02 08:42:08 |
#include <bits/stdc++.h> using namespace std; int main() { string s1, tmpp; int n; cin >> s1 >> n; for (int i = 1; i <= n; i++) { tmpp = s1; s1.erase(0, 1); for (int j = 1; j < tmpp.size(); j++) { string tmp = tmpp; tmp.erase(j, 1); if (s1 > tmp) s1 = tmp; } } cout << s1 << endl; return 0; }