| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135705 | 田子熙 | 删除单词后缀 | C++ | Accepted | 1 MS | 276 KB | 316 | 2025-11-08 11:45:07 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int b=s.length(); if(s[b-2]=='e' && s[b-1]=='r'){ s.erase(b-2,2); }else if(s[b-2]=='l' && s[b-1]=='y'){ s.erase(b-2,2); }else if(s[b-3]=='i' && s[b-2]=='n' && s[b-1]=='g'){ s.erase(b-3,3); } cout<<s; return 0; }