Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3540 | 吴奕希 | 删除单词后缀 | C++ | Runtime Error | 1 MS | 324 KB | 284 | 2024-06-15 10:26:28 |
# include<iostream> using namespace std; int main(){ string a, b; cin>>a; int s = a.size(), dels = 0; if(a.substr(s-3, 3)=="ing")a = a.erase(s-3, 3); else if(a.substr(s-2, 2)=="er"||a.substr(s-2, 2)=="ly")a = a.erase(s-2, 2); cout<<a; return 0; }
terminate called after throwing an instance of '