| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 156237 | 李昱龙 | 删除单词后缀 | C++ | Accepted | 1 MS | 280 KB | 347 | 2026-06-27 13:53:16 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int len=s.size(); if(len>3&&s.substr(len-3,3)=="ing"){ s=s.erase(len-3,3); } else if(len>2&&s.substr(len-2,2)=="er"){ s=s.erase(len-2,2); } else if(len>2&&s.substr(len-2,2)=="ly"){ s=s.erase(len-2,2); } cout<<s; return 0; }