| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160786 | 杜雨轩 | 删除单词后缀 | C++ | Accepted | 1 MS | 276 KB | 301 | 2026-09-26 14:02:21 |
#include<bits/stdc++.h> using namespace std; int main() { string a; cin>>a; int len=a.size(); if(len>2&&a.substr(len-2,2)=="er"||len>2&&a.substr(len-2,2)=="ly") { a=a.erase(len-2,2); } else if(len>3&&a.substr(len-3,3)=="ing") { a=a.erase(len-3,3); } cout<<a<<endl; return 0; }