| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 161803 | 赵奕杰 | 删除单词后缀 | C++ | Accepted | 2 MS | 272 KB | 346 | 2026-10-07 14:38:57 |
#include<bits/stdc++.h> using namespace std; string a; int main(){ cin>>a; int len=a.size(); if(len>2&&a.substr(len-2,2)=="er"){ a.erase(len-2,2); } else if(len>2&&a.substr(len-2,2)=="ly"){ a.erase(len-2,2); } else if(len>3&&a.substr(len-3,3)=="ing"){ a.erase(len-3,3); } cout<<a; return 0; }