| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135724 | 陈梓钒 | 删除单词后缀 | C++ | Accepted | 1 MS | 280 KB | 320 | 2025-11-08 12:03:56 |
#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; }