Run ID:135724

提交时间: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; }