提交时间:2025-05-05 14:43:03
运行 ID: 320501
#include<bits/stdc++.h> using namespace std; string s; int main(){ cin>>s; int len=s.size(); if(s.substr(len-2,len)=="er"||s.substr(len-2,len)=="ly")cout<<s.substr(0,len-2); else if(s.substr(len-3,len)=="ing")cout<<s.substr(0,len-3); else cout<<s; return 0; }